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!

Enterprise Security Content Updates (ESCU) - New Releases

In the last month, the Splunk Threat Research Team (STRT) has had 3 releases of new content via the Enterprise ...

Thought Leaders are Validating Your Hard Work and Training Rigor

As a Splunk enthusiast and member of the Splunk Community, you are one of thousands who recognize the value of ...

.conf23 Registration is Now Open!

Time to toss the .conf-etti &#x1f389; —  .conf23 registration is open!   Join us in Las Vegas July 17-20 for ...