Splunk Search

Why the field is shown by extraction of another field but not found by search?

alval
New Member

Hi, as I create an extraction field with regex, the field match is shown correct. I can check the regex on https://regex101.com/. The field is shown in raw events, if I tray to define next field

FieldFound.PNG

But in search the field is not found.

Field extraction regex: (?<=Evaluation: )(?P<evaln_from_tr>.*)(?= NumOfChannels)

Sample log line: [30-Apr-2022 05:52:40][XXX][getResults]Evaluation: zl_numcount NumOfChannels: 1

Permissions: Everybody read and write

Verbose mode search without a new field:  index=XXX sourcetype=XXX host=XXX source="XXX.txt" method=geResults "* NumOfChannels: *"

found 1485 events like example, with different names.

Verbose mode search with a new field: index=XXX sourcetype=XXX host=XXX source="XXX.txt" method=geResults  evaln_from_tr="*"  "* NumOfChannels: *"

found 0 events!

Why the field is shown by extraction of another field but not found by search?

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The expressions generated by the Field Extraction wizard aren't the greatest.  Also, based on problems reported here, lookbehind and lookahead operators seem to be an issue.

Try this simpler regex:

Evaluation: (?P<evaln_from_tr>\S*)
---
If this reply helps you, Karma would be appreciated.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...