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!

Splunk App for Anomaly Detection End of Life Announcement

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...