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

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

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
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...