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!

Community Content Calendar, November Edition

Welcome to the November edition of our Community Spotlight! Each month, we dive into the Splunk Community to ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...

Stay Connected: Your Guide to November Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...