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!

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

Get More Out of Your Security Practice With a SIEM

Get More Out of Your Security Practice With a SIEMWednesday, July 31, 2024  |  11AM PT / 2PM ETREGISTER ...