Security

What is regex for dem_d54879.csv?

karu0711
Communicator

I want to extract 5degit. number 54879 as number field  

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi @karu0711 ... we understood the issue.. but, still thats a very vague question... if you provide the log sample.. we can create the exact rex / regex command..

 

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You can use rex to extract digits from a field - do you already have this value in a field?

| rex field=<field name> "(?<digits>\d+)\.csv"

karu0711
Communicator

thank it work.
I also need to rex "dem" as separate field as name.

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex field=<field name> "(?<dem_field>\w+)_(?<digits>\d+)\.csv"
Get Updates on the Splunk Community!

Index This | What did the zero say to the eight?

June 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

Splunk Observability Cloud's AI Assistant in Action Series: Onboarding New Hires & ...

This is the fifth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Now Playing: Splunk Education Summer Learning Premieres

It’s premiere season, and Splunk Education is rolling out new releases you won’t want to miss. Whether you’re ...