Splunk Enterprise

How do I perform a trim on text

gary75
New Member

I need to extract values from a field, say values are aaaa@gmail.com, bbbb@gmail.com, gggggg@gmail.com, fffff@gmail.com.

My requirement is to trim the values before the '@' symbol and only display the values after '@' . for e.g @gmail.com.

Your help is appreciated.

Tags (1)
0 Karma

woodcock
Esteemed Legend

There are many ways to do this, including:

... | rex field=emailAddress "(?<username>[^@])"
0 Karma

HiroshiSatoh
Champion

E-mail address Are you more? If one

trim_field:aaaa@gmail.com
・・・・|eval domain=mvindex(split(trim_field,"@"),1)
->gmail.com

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...