Splunk Enterprise Security

rex fields

lucky
Explorer

 

HI ,

please help to get new field URI by using rex 



/area/label/health/readiness||||||||||METRICS|--

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

this should works

...
| rex "(?<URI>^[^\|]+)"

 I assume that your event is in _raw. If it's already in some field then just add "fields=<your field>" after rex.

https://regex101.com/r/IsMwQy/1

r. Ismo

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

Your question is rather vague, but assuming you want the beginning of the _raw event field up to but not including the first | you could try this

| rex "^(?<url>[^\|]+)"
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 ...