Splunk Search

Regex Help

jboustead
Explorer

Please help create a Regex that will only take the 4 characters/number after MTCP from below events?

For example below, the regex should pick up YUM3, WOPP, WOLG.

/XXX/XXXXX/XXXX/XXXXX/MFG_MTCPYUM3..XX_YUM3_XXXX

/XXX/XXXXX/XXXX/XXXXX/MFG_MTCPWOPP..XX_WOPP_XXXX

/XXX/XXXXX/XXXX/XXXXX/MFG_MTCPWOLG..XX_WOLG_XXXX

Thanks

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex "MTCP(?<field>\w{4})"

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "MTCP(?<field>\w{4})"
0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...