Splunk Search

extract module name (till colon)

indeed_2000
Motivator
Hi
regex for extract module name 
 
here is the log:
15:25:36.999 user module_W: A[00]B[0000000]C[0]L: process read compeleted!
the module name is "module_W" after user "start  with star wildcard till colon"
 
Any idea?
Thanks,
 
Labels (6)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
| rex "^\S+\s\S+\s(?<module>[^:]+)"

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
| rex "user (?<module>[^:]+)"

indeed_2000
Motivator

thank you for answer, user is not static value are different for users, is it possible to set (variable user after that space) for first part? 

FYI: there are some special character in users

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust
| rex "^\S+\s\S+\s(?<module>[^:]+)"
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...