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 | What is broken 80% of the time by February?

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

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...

Splunk MCP & Agentic AI: Machine Data Without Limits

Discover how the Splunk Model Context Protocol (MCP) Server can revolutionize the way your organization uses ...