Splunk Search

Regular expression for a pattern


Hi we have some uri's as shown below which have 2 words (/verify/abrasives) before /ecatalog and 3 words and 4 words. I want to get the uri's only after /ecatalog


i have tried like this but it did not give me proper results. Any suggestions?

Base search | rex field=uri_path ".*?(?[^(?:/ecatalog)]+)"

Tags (1)
0 Karma

Revered Legend

Try this

Your base search| rex field=uri "/ecatalog(?<custom>.*)" 
0 Karma


This worked for me on RegExr using your sample data.

rex field=uri_path "(?<custom>(\/verify[\/[\S]*))\/ecatalog"
If this reply helps you, Karma would be appreciated.
0 Karma


Thanks. This gives me before /ecatalog. I want the part which is after ecatalog.

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