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.
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

ATTENTION: We’re Moving! (AGAIN!)

The Splunk Community Slack is undergoing a system migration to keep our workspace secure and ...

Deep Dive: Optimizing Telemetry Pipelines in Splunk Observability Cloud

In this session, we will peel back the layers of Splunk Observability Cloud’s cost-optimization features. ...

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...