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!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

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 ...