Splunk Dev

How do I extract filename from different paths in the field name "FileList" with the help of regex ?

jugalkinariwala
Explorer

I have below files in one of the fields named "FileList"
/dir1/dir2/f1.txt

/dir1/f2.csv

/dir1/dir2/dir3/xyzdir/f3.bat

f4.txt

/xvz/dir/f5.txt

I want an output which shows only the last name which is the actual filename from the above "FileList" field as below
f1.txt

f2.csv

f3.bat

f4.txt

f5.txt

Labels (1)
0 Karma
1 Solution

jugalkinariwala
Explorer

Got the results myself .

 

Thanks to all 🙂

View solution in original post

0 Karma

jugalkinariwala
Explorer

Got the results myself .

 

Thanks to all 🙂

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...