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 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...