Splunk Search

rex help

surekhasplunk
Communicator

I am using a query below which gives me rules field

index=myindex| spath "Rules{}" output=rules |mvexpand rules
 | table device ip rules | rex field=rules "\:(?<rule_name>[^\,]+)\,(?<rule_result>[^\,]+)"

rules field has data like below:

{"name": "Abc Def - 123", "result": true}

Now i want these two to be spitted into two fields rules_name and rules_result 

 

Labels (1)
Tags (2)
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @surekhasplunk,

is this a duplicated question?

if not, see the answer in https://community.splunk.com/t5/Splunk-Search/rex-help/td-p/521426/jump-to/first-unread-message

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

New Case Study: How LSU’s Student-Powered SOCs and Splunk Are Shaping the Future of ...

Louisiana State University (LSU) is shaping the next generation of cybersecurity professionals through its ...

Splunk and Fraud

Join us on November 13 at 11 am PT / 2 pm ET!Join us for an insightful webinar where we delve into the ...

Build Your First SPL2 App!

Watch the recording now!.Do you want to SPL™, too? SPL2, Splunk's next-generation data search and preparation ...