Splunk Search

How to extract a alphanumeric values with special characters

av_
Path Finder

I want to extract Sample ID field value
"Sample ID":"020ab888-a7ce-4e25-z8h8-a658bf21ech9"

Labels (1)
0 Karma

yuanliu
SplunkTrust
SplunkTrust

Additionally, the format looks too much like part of JSON.  If part or the whole of your event is JSON, you should treat it as structured data, not isolated strings.  Can you share the raw event? (Anonymize as needed.)

richgalloway
SplunkTrust
SplunkTrust

What you need is everything between the quotation marks.  Try this

| rex "Sample ID\\\":\\\"(?<SampleID>[^\"]+)"
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Index This | When is October more than just the tenth month?

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

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...