Splunk Search

How to use extract using rex command?

wvsgo215
Engager

"Context":"{"user id":"jane.doe.sen", "Expense Date":"11/10/2022",

How to use extract this rex command?     

to come up result like 

user id Expense Date
jane.doe.sen 9/6/2022

please help                                                                                              

Labels (1)
Tags (2)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Assuming the field is as written and is in the _raw field

| rex "user id\":\"(?<user_id>[^\"]*)\",\s+\"Expense Date\":\"(?<expense_date>[^\"]*)"
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 ...