Splunk Search

How to extract the 3 words after [yyy] using regex?

SS1
Path Finder

Hi,

I need help to extract the 3 words after [yyy] using regex, 

True [xxx] [yyy] Issue with ios phone 11

False [yyy] Issue with android phone

True [yyy] Issue with windows phone

 

 

Labels (5)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "\[yyy]\s(?<threewords>\S+\s+\S+\s+\S+)"
0 Karma

burwell
SplunkTrust
SplunkTrust
| rex "\[yyy\] (?<three_words>\S+\s+\S+\s+\S+)"
| table three_words


This creates a new field called three_words

0 Karma
Get Updates on the Splunk Community!

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

&#x1f342; Fall into November with a fresh lineup of Community Office Hours, Tech Talks, and Webinars we’ve ...

Transform your security operations with Splunk Enterprise Security

Hi Splunk Community, Splunk Platform has set a great foundation for your security operations. With the ...

Splunk Admins and App Developers | Earn a $35 gift card!

Splunk, in collaboration with ESG (Enterprise Strategy Group) by TechTarget, is excited to announce a ...