Negative Regex to extract rows with/without email address?

Hi
I have some date in a column. Some of the data contains email addresses and some just text but this may contain an @ symbol.
I only want to keep the rows where there is an email address. I have tried using the Regex, but in essence I need it to be a negative regex, so the rows with “call me @ 12” are removed.

At present I use a simple filter, must contain @ but this does not work for the “call me @ 12”. Does anyone know how I can keep just the rows with a valid email address?

Try the Regex Step, and use this pattern I found in the community section of regexr.com

[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?

If that is missing a character due to this post format, just grab the pattern here: regexr.com/2rhq7

Starting with this data:

I get this result:

Then you can filter by that new column to only keep rows with an email detected in it.

2 Likes