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!

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

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 ...