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!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...