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!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...