Splunk Search

Regex Help

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

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

View solution in original post

0 Karma

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

View solution in original post

0 Karma
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!