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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...