All Apps and Add-ons

Hello experts, I would like to split the fourth part of value in splunk.

Ashwini_5
Explorer

Hello experts, I would like to split the  fourth part of below lines . Please provide your suggestion if I can use REGEX for it. 

Projects/IMGSD-102/Data/abc-NNN/00000000001
Projects/IMGSD-102/Data/abc-NNN/00000000001
Projects/IMGSD-102/Data/abc-NNNN/00000000001
Projects/IMGSD-102/Data/abc-NN/00000000001
Projects/IMGSD-102/Data/abc-N/00000000001

 

Now I need to get the answer as below.

abc-NNN

abc-NNN

abc-NNNN

abc-NN

abc-N

Kindly provide your suggestion for the same. 

 

Labels (1)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex "([^\/]+\/){3}(?<part>[^\/]+)\/"

View solution in original post

Ashwini_5
Explorer

Thanks a lot for your kind reply 🙂 @ITWhisperer  It helped me 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "([^\/]+\/){3}(?<part>[^\/]+)\/"
Get Updates on the Splunk Community!

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...

[Live Demo] Watch SOC transformation in action with the reimagined Splunk Enterprise ...

Overwhelmed SOC? Splunk ES Has Your Back Tool sprawl, alert fatigue, and endless context switching are making ...

What’s New & Next in Splunk SOAR

Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us on ...