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!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

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

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...