Splunk Search

Regex help connected string

moinyuso96
Path Finder

I would like to extract two groups which are TestName and Model. In the second row, the TestName is connected to Model cannot be extracted as two different groups.

Link for regex:

regex101: build, test, and debug regex

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

Is it always MY followed by digits?

(?P<TestName>(?<=!\s)[^\s]+)\s?(?P<Model>MY\d+)

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust

Is it always MY followed by digits?

(?P<TestName>(?<=!\s)[^\s]+)\s?(?P<Model>MY\d+)

moinyuso96
Path Finder

Yes

0 Karma
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 ...