Help

regex email validation doesn't work

Topic Labels: Data Formulas
Solved
Jump to Solution
1141 7
cancel
Showing results for 
Search instead for 
Did you mean: 
NitaiLS
6 - Interface Innovator
6 - Interface Innovator

Hi,

I'm trying to validate customer's mails, to send them automated mails.

I created a column validating another Email column in my relevant table, but the formula shows me that the mail doesn't match the regex, even though I know it's a working mail.

the formula is: 

IF((REGEX_MATCH({Email}, "[A-z0-9.+-_]+@[A-z0-9-]+\\.[A-z]+/g")),"Yes","No")
 
I've basically took it from here:
 
 
the example is this:
 
Can someone please assist?
1 Solution

Accepted Solutions
ScottWorld
18 - Pluto
18 - Pluto

Their example has a typo in it, which you should report to Airtable using the thumbs down button at the bottom of the article.

Here is the working formula:

REGEX_MATCH( {Email address}, "(\W|^)[\w.\\-]{0,25}@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(\W|$)")

See Solution in Thread

7 Replies 7

That doesn't look like the regex in the support page you cite. It also doesn't look like an Airtable RE2 regex pattern because it ends in /g.

You are right. it was another Regex I tried.

tried also the one in the link, still didn't work("(\W|^)[\w.\\-]{0,25}@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(\W|$)")

This is the example that  appears in the link:

REGEX\_MATCH( {Email address}, "(\W|^)[\w.\\-]{0,25}@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(\W|$)")

ScottWorld
18 - Pluto
18 - Pluto

Their example has a typo in it, which you should report to Airtable using the thumbs down button at the bottom of the article.

Here is the working formula:

REGEX_MATCH( {Email address}, "(\W|^)[\w.\\-]{0,25}@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}(\W|$)")

NitaiLS
6 - Interface Innovator
6 - Interface Innovator

Still doesn't work. 😕

It works just fine for me. 

What is your field type? Is it a lookup field? If so, you will need to convert it to a text string.

Can you include screen shots?

NitaiLS
6 - Interface Innovator
6 - Interface Innovator

Thank you guys! 

It worked. Found other typoes in my formula, and after implementing the formula @ScottWorld sent, it worked perfectly.