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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...