Splunk Search

Is it possible to search for a specific email scheme? (not a specific string of characters)

amcb90
Engager

Would it be difficult to create a rex search for an email scheme starting with alpha characters (no set amount of characters) and ending in 3 or more numbers before the "@" symbol of an email address?

If anyone knows how and can explain, that would be greatly appreciated!

0 Karma

saurabhkharkar
Path Finder
Does this help ?

| makeresults
| eval email="recipient1234@gmail.com"
| rex field=email "(?<username>[A-Za-z]+\d{3,})\@(?<domain>\S+)"
| table email username domain

[A-Za-z]+\d{3,} -> will find a string with upper case or lower case characters followed by three or more numbers and will extract it to the field username

\S+ -> Captures anything but a white space  after the @ and extracts it to the dield domain
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...