Splunk Search

How to extract text from regular expression "StatusCode_10.178.28.50_1406758126523_19607_10507178"

mvaradarajam
Path Finder

Hi All,

How to extract 10507178 from below string.here all are not constant.but format is same

StatusCode_10.178.28.50_1406758126523_19607_10507178

Tags (1)
0 Karma

somesoni2
Revered Legend

General one to get the last number in the string (after last underscore )

"_(?<YourField>\d+)$"
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Based on that one example, you could use this:

\w+_\d+\.\d+\.\d+\.\d+_\d+_\d+_(<field_name>\d+)
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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