Splunk Search

Need help on rex

Annna
Explorer

wed } } }, { "S" : "12:00" } } }, "day" M" : { "close" : { "S" : "23:00" open "S" : "12:00" } } } } }, "email" : { "S" : " DHours" } } }, "email" : { "S" : " Hours" } } }]

| rex "wed.\D}.\D.\D.(?<sample>.*)DHours

i used above rex and gives the result like

{ "S" : "12:00" } } }, "day" M" : { "close" : { "S" : "23:00"open "S" : "12:00" } } } } }, "email" : { "S" : "

but i need below output

Result should be like 

{ "S" : "12:00" } } }, "day" M" : { "close" : { "S" : "23:00"open "S" : "12:00" } } } } }

Labels (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @Annna,

the results you have from your regex is the correct one for your regex, please try this:

| rex "wed.\D}.\D.\D.(?<sample>.*),\s+\"email\".*DHours"

that you can test at  https://regex101.com/r/CutdeR/1

Ciao.

Giuseppe

View solution in original post

0 Karma

Annna
Explorer

its working. Thank you..!!

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Annna,

good for you.

Ciao and happy splunking.

Giuseppe

P.S. Karma Points are appreciated 😉

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @Annna,

the results you have from your regex is the correct one for your regex, please try this:

| rex "wed.\D}.\D.\D.(?<sample>.*),\s+\"email\".*DHours"

that you can test at  https://regex101.com/r/CutdeR/1

Ciao.

Giuseppe

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...