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!

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

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

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...