Splunk Search

How can I extract additional fields from this source?

vinisha29
New Member

eg:
source = shuttle(Oct1-3).zip:./shuttle/5720/LOG/shuttle_log.20171002 ,shuttle_3.zip:./shuttle_3/5720/LOG/shuttle_log.20171011....etc
I want to extract folder _no : 5720

If possible please tell the regex expression to extract the fields
Pls help me.

Thanks

0 Karma

koshyk
Super Champion

Have a try regex of (Based on 5720 being the 2nd occurence in /)

(?:\/(.+?)){2}\/

https://regex101.com/r/kOJR7y/1

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...