Getting Data In

Rex

Khuzair81
Path Finder

field1=abcdCheck:123456wxyz, sdfCheck:234567qwe

I want get the result as Check:123456

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex field=field1 "(?<check>Check:\d+)"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| rex field=field1 "(?<check>Check:\d+)"

Khuzair81
Path Finder

@ITWhisperer Got one more Question

field2 = word[abcdefg_123]word

I want to get answer as : [abcdefg_123]

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex field=field2 "\w(?<other>\[[^\]]+\])\w"
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...