Splunk Search

Why am I getting this error when using regex for URI search?

ghildiya
Explorer

I have the following query to search results which contain a specific rest endpoint which has a UUID path parameter:

 

 

.... | regex requestURI="/baseurl/\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b

 

 

But it seems to be wrong. Error is :

 

 

Unknown search command '0'.

 

 

What is the mistake I am making here?

Labels (1)
Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust
Splunk appears to be interpreting part of your regular expression as a subsearch. Make sure the expression is enclosed in quotation marks and any embedded quotation marks are escaped.
---
If this reply helps you, Karma would be appreciated.
0 Karma

ghildiya
Explorer

I tried this:

.... | regex requestURI=*/baseurl/\"[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\"*

But this too doesn't work. 

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust
The regex command is still missing the enclosing quotation marks.
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...