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!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...