Splunk Dev

need rex to fetch string between []

rkishoreqa
Communicator

I need to fetch the value 'app_mot_auto_toyota_cars_SOA' from the below string.  I tried with the rex - rex field=_raw "[INFO ]\s[(?P<Applname>)]\s+".   But it is not working. 

Can anyone please help me with the regex expression.

> [INFO ] [app_mot_auto_toyota_cars_SOA]

Labels (1)
0 Karma
1 Solution

saravanan90
Contributor

This may help..

|makeresults | eval _raw="[INFO ] [app_mot_auto_toyota_cars_SOA]" | rex field=_raw "\[INFO\s]\s\[(?<Applname>\S+)]"

View solution in original post

saravanan90
Contributor

This may help..

|makeresults | eval _raw="[INFO ] [app_mot_auto_toyota_cars_SOA]" | rex field=_raw "\[INFO\s]\s\[(?<Applname>\S+)]"

Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...