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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...