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!

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

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