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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...