Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

regex email validation doesn't work

Topic Labels: Data Formulas
Solved
Jump to Solution
2713 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
kuovonne
18 - Pluto
18 - Pluto

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.

NitaiLS
6 - Interface Innovator
6 - Interface Innovator

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. ðŸ˜•

ScottWorld
18 - Pluto
18 - Pluto

It works just fine for me. 

kuovonne
18 - Pluto
18 - Pluto

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.