Splunk Search

Will you help me create the regex to convert the following data into a column value pair?

ppanchal
Path Finder

Hi,

Below is my sample payload. I want to convert/display it into a column value pair.
Eg, ESBTransactionID
75010569

Any help is appreciated.

75010569\n  OCS\n  \n    Update\n    TKT\n    TKT\n    \n      OCS Driver\n    \n    OCS Driver\n  \n  000141076513003\n  false\n  \n    \n      R_SUBBED\n      TKT
Tags (2)
0 Karma

valiquet
Contributor

| MAKERESULTS
| Eval s="75010569\n OCS\n \n Update\n TKT\n TKT\n \n OCS Driver\n \n OCS Driver\n \n 000141076513003\n false\n \n \n R_SUBBED\n TKT" |rex mode=sed field=s "s/\\n /=/g" | rex field=s max_match=0 "(?[^=]+)=(?[^=]+)" |fields transaction VALUE | fields - _time

0 Karma

richgalloway
SplunkTrust
SplunkTrust

See if this helps.

index=foo | rex "(?<ESBTransactionID>^\d{8})" | table ESBTransactionID
---
If this reply helps you, Karma would be appreciated.
0 Karma

woodcock
Esteemed Legend

Like this?

Your search here
| rex "^(?<ESBTransactionID>\d+)"
| table ESBTransactionID
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...