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!

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...