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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...