Splunk Search

How do I split/extract these string values to only use part of the string for a field in my search?

RICKZHANG
Engager

Here are some eventNames: 2022-NO_USER_IN_SESSION, 1022-DRR_INFO, ...
I need the values like: NO_USER_IN_SESSION, 1022-DRR_INFO (so eventName=NO_USER_IN_SESSION)
How to split the eventNames (2022-NO_USER_IN_SESSION, 1022-DRR_INFO)

index=app sourcetype=Epc*Event splunk_server_group=ewe sourcetype=EpcPromotionsEvent  eventName=?
0 Karma

fdi01
Motivator

use regular expression to do it .

Based on the fact that this is relatively simple regular expression, I will leave some links here to help you learn.

http://regexone.com/ - this is a great interactive tutorial
https://regex101.com/ - test out your regex ! example: https://regex101.com/r/eF7oF2/1
Splunk Regular Expressions - docs are great
Regular Expression Tutorial

richgalloway
SplunkTrust
SplunkTrust

What are the criteria for separating eventNames?

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering.  Because we’ve ...

How to Send Splunk Observability Alerts to Webex teams in Minutes

As a Developer Evangelist at Splunk, my team and I are constantly tinkering with technology to explore its ...