Splunk Search

How to trim a string to a new field

anasshsa
Engager

Hello,
I cannot figure out the syntax of the rex function. I have a field called data multiple email addresses: eample@blahblah.com. ODY=7BIT

I need to create a new field where just @blabla.com without the rest of data from the begining or the ending of the filed.

0 Karma

woodcock
Esteemed Legend

Like this:

... | rex field=data "^[^@]*@(?<capture>[^\.]+)"
0 Karma

vnravikumar
Champion
0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...