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!

.conf25 Registration is OPEN!

Ready. Set. Splunk! Your favorite Splunk user event is back and better than ever. Get ready for more technical ...

Detecting Cross-Channel Fraud with Splunk

This article is the final installment in our three-part series exploring fraud detection techniques using ...

Splunk at Cisco Live 2025: Learning, Innovation, and a Little Bit of Mr. Brightside

Pack your bags (and maybe your dancing shoes)—Cisco Live is heading to San Diego, June 8–12, 2025, and Splunk ...