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!

Wrapping Up Cybersecurity Awareness Month

October might be wrapping up, but for Splunk Education, cybersecurity awareness never goes out of season. ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

&#x1f5e3; You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...

What's New in Splunk Observability - October 2025

What’s New?    We’re excited to announce the latest enhancements to Splunk Observability Cloud and share ...