Splunk Search

How to extract portions of an event?

kkompalli
New Member

I have a event which is like below.

"searchString" index=ABC1............XYZ1"/searchString" 123456789 "searchString"index=ABC2.....................XYZ2"/searchString" 

I want to extract the data between "searchString" and "/searchString" .
the output should be like below

index=ABC1............XYZ1
index=ABC2.....................XYZ2
0 Karma

sundareshr
Legend

In you SPL, you could try this

.... | rex "searchString"\s(?<ss>[^"]*)"\/" | ...
0 Karma
Get Updates on the Splunk Community!

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

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...