Splunk Search

Field extraction query

p_basanth
New Member

Any pointers on how to extract the third field
Event1: <>
Event2:
the third field is populated with double <<>> and sometimes with single <>.

regex for double<<>>

\s+<([^>]+\>)>

regex for single <>

\s+<([^>]+)

how to combine both?

Tags (1)
0 Karma

Ayn
Legend

First of all it seems your regex for double brackets is incorrect? Unless you want to match the inner brackets...I'm assuming this is what you want in my answer.

How about

\s+<(.+?>*)>
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...