Splunk Search

How to extract string from lookup field?

nathanluke86
Communicator

Hi,

 

I need to extract a string from a field in a lookup.

need to extract between <query> and <query>  and the field name is "eai:data"

any help would be appreciated.

 

Labels (3)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @nathanluke86,

if you could share some sample of your data I could be more detailed, anyway, please try a regex like this:

| rex field=your_lookup_field "\<query\>(?<eai:data>[^\<]*)"

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @nathanluke86,

if you could share some sample of your data I could be more detailed, anyway, please try a regex like this:

| rex field=your_lookup_field "\<query\>(?<eai:data>[^\<]*)"

Ciao.

Giuseppe

Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...