Splunk Search

rex extract

jenkinsta
Path Finder

Value session_value containg this info:

not found, name: user@mycompany.com more text here 

Trying to use this:
rex field=session_value ":(?<session_value>)@"

To extract: user

I think I am close, anyone assist? 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Yes, it's close.  regex101.com can tell you that, too.  Try this:

| rex field=session_value ": (?<user>[^@]+)@"
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...