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!

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...

Observability protocols to know about

Observability protocols define the specifications or formats for collecting, encoding, transporting, and ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...