Splunk Search

Comparing fields that don't match.

howyagoin
Contributor

Hi,

I've been trying to solve this one with various hints given here already (subsearch, use of eval, etc), but haven't found an approach that works...

I have a list of email addresses, as well as the first name and last name of the account owner.

I'm trying to build up a list of events/entries where neither the first nor the last name appears anywhere obvious in the email address itself.

By using eval, it was easy enough to split the email account name from the domain, but, what's the best way to find the following:

First  Last      Email
----------------------------------------
Tom     Smith     tsmith@foo.com
Jane    Doe       yellowpony@blerp.edu
Bob     Jones     bobjo@morp.com

What I'd like to do is have only Jane Doe show up in a query, as only her address contains neither her first name or last name.

Thanks for any suggestions!

Tags (2)
0 Karma
1 Solution

Ayn
Legend

Use where and match the first and last name with the email address.

... | where !(match(lower(Email),lower(First)) OR match(lower(Email),lower(Last)))

View solution in original post

0 Karma

Ayn
Legend

Use where and match the first and last name with the email address.

... | where !(match(lower(Email),lower(First)) OR match(lower(Email),lower(Last)))
0 Karma

howyagoin
Contributor

D'OH, I had tried match, but didn't think about the lower() first. Thanks!

0 Karma
Get Updates on the Splunk Community!

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

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

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...