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!

Discover Powerful New Features in Splunk Cloud Platform: Enhanced Analytics, ...

Hey Splunky people! We are excited to share the latest updates in Splunk Cloud Platform 9.3.2408. In this ...

Splunk Classroom Chronicles: Training Tales and Testimonials

Welcome to the "Splunk Classroom Chronicles" series, created to help curious, career-minded learners get ...

Access Tokens Page - New & Improved

Splunk Observability Cloud recently launched an improved design for the access tokens page for better ...