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>[^\/]+)\/"
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

What Is Splunk? Here’s What You Can Do with Splunk

Hey Splunk Community, we know you know Splunk. You likely leverage its unparalleled ability to ingest, index, ...

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...