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!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...