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!

Splunk Smartness with Brandon Sternfield | Episode 3

Hello and welcome to another episode of "Splunk Smartness," the interview series where we explore the power of ...

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...