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!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...