Splunk Search

Can you help me build a regex that can extract a field from the following event?

jip31
Motivator

Hello

I want to extract the field below from my event

ABDM-TOUPDATE.$w$

could you help me please?

0 Karma
1 Solution

inventsekar
SplunkTrust
SplunkTrust

Pls check this run-anywhere example -
(please provide some logs and more details, so that exact rex query can be written -)

| makeresults 
| eval _raw = "something something ABDM-TOUPDATE.5w2 something something"
| rex field=_raw "(?P<rexHELP>ABDM-TOUPDATE\.\d\w\d)"
| table _raw rexHELP

alt text

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

View solution in original post

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Pls check this run-anywhere example -
(please provide some logs and more details, so that exact rex query can be written -)

| makeresults 
| eval _raw = "something something ABDM-TOUPDATE.5w2 something something"
| rex field=_raw "(?P<rexHELP>ABDM-TOUPDATE\.\d\w\d)"
| table _raw rexHELP

alt text

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

493669
Super Champion

could you please share what needs to be extracted and whats your raw event?

0 Karma

jip31
Motivator

I cant sent the raw event because confidentiality
in my event, i just want to extract this: ABDM-TOUPDATE.$w$

0 Karma

FrankVl
Ultra Champion

Just that literal string? Or are those $ signs placeholders of something?

And what do you want to extract it from and where do you want to extract it into?

Simple example extracting from _raw into field1: | rex field=_raw "(?<field1>ABDM-TOUPDATE\.\$w\$)"

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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...