Splunk Search

Splunk - field extraction

chuck_life09
Path Finder

I need to extract a value from this field and update in my table.

Details.Context = "dgfhgjj <Property Name="Name" VariantType="8">TRIMWorkgroup</Property>"

field_name               irrelevant data            when Name="Name" i want the result value (TRIMWorkgroup) in this case as my field value in new field name called "Service"

Help me with a rex command for this.

Labels (1)
Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @chuck_life09,

let me understand:

when you have Name="Name", you want the string between ">" and "<", if this is your need, please try this:

 

| rex field=Details.Context "Name\=\"Name\"[^\>]+\>(?<your_field>[^\<]+)"

 

you can test the regex at https://regex101.com/r/ainfns/1

Ciao.

Giuseppe

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @chuck_life09,

let me understand:

when you have Name="Name", you want the string between ">" and "<", if this is your need, please try this:

 

| rex field=Details.Context "Name\=\"Name\"[^\>]+\>(?<your_field>[^\<]+)"

 

you can test the regex at https://regex101.com/r/ainfns/1

Ciao.

Giuseppe

chuck_life09
Path Finder

thank you so much, it worked ...

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @chuck_life09,

good for you!

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated 😉

Get Updates on the Splunk Community!

Application management with Targeted Application Install for Victoria Experience

  Experience a new era of flexibility in managing your Splunk Cloud Platform apps! With Targeted Application ...

Index This | What goes up and never comes down?

January 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Splunkers, Pack Your Bags: Why Cisco Live EMEA is Your Next Big Destination

The Power of Two: Splunk &#43; Cisco at "Ludicrous Scale"   You know Splunk. You know Cisco. But have you seen ...