Splunk Search

How can I extract data with delimiter?

yk010123
Path Finder

I have a log entry with the current format: 

 

field=A_B

 

(delimited by underscore)

How can I extract this data into two different fields so that I can create a table 

field1field2
AB
Labels (2)
0 Karma
1 Solution

bowesmana
SplunkTrust
SplunkTrust

If your field is called 'field' then this

| rex field=field "(?<field1>[^_]*)_(?<field2>.*)"

will create new fields 'field1' and 'field2' 

View solution in original post

bowesmana
SplunkTrust
SplunkTrust

If your field is called 'field' then this

| rex field=field "(?<field1>[^_]*)_(?<field2>.*)"

will create new fields 'field1' and 'field2' 

Get Updates on the Splunk Community!

Dashboard Studio Challenge - Learn New Tricks, Showcase Your Skills, and Win Prizes!

Reimagine what you can do with your dashboards. Dashboard Studio is Splunk’s newest dashboard builder to ...

Introducing Edge Processor: Next Gen Data Transformation

We get it - not only can it take a lot of time, money and resources to get data into Splunk, but it also takes ...

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...