Use REGEX to filter emails

Avatar

Avatar
Give Back
Level 3
RaulOcana
Level 3

Likes

14 likes

Total Posts

58 posts

Correct reply

4 solutions
Top badges earned
Give Back
Validate 25
Validate 10
Validate 1
Boost 5
View profile

Avatar
Give Back
Level 3
RaulOcana
Level 3

Likes

14 likes

Total Posts

58 posts

Correct reply

4 solutions
Top badges earned
Give Back
Validate 25
Validate 10
Validate 1
Boost 5
View profile
RaulOcana
Level 3

06-11-2019

Hi guys,

I was reading that ACC understands REGEX using LIKE operator. So I used

@email LIKE '^[A-Za-z]+[A-Za-z0-9\._-]+@[A-Za-z0-9\.-]+\.[A-Za-z]{2,5}[\.]*$'

to filter all emails that matches the REGEX expression, however it its returning 0 results.

Is this the correct way to use it or am I missing something?

Thank you!

- Raúl

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

977 likes

Total Posts

1,096 posts

Correct reply

516 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

06-11-2019

Hi,

Like is wildcard match in SQL, generally used with '%':

All supported RDBMS' in ACC ship with regex engines. E.g. for Postgres:

The desired functions can be used in ACC by adding to its function list or by turning off its whitelist via setting xtk:option XtkPassUnknownSQLFunctionsToRDBMS to 1.

Thanks,

-Jon

Answers (1)

Answers (1)

Avatar

Avatar
Contributor
MVP
Raj_bounteous
MVP

Likes

90 likes

Total Posts

97 posts

Correct reply

32 solutions
Top badges earned
Contributor
Shape 1
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Contributor
MVP
Raj_bounteous
MVP

Likes

90 likes

Total Posts

97 posts

Correct reply

32 solutions
Top badges earned
Contributor
Shape 1
Give Back 10
Give Back 5
Give Back 3
View profile
Raj_bounteous
MVP

06-11-2019

Hi,

check if you can find a solution in the extensively discussed question. I think this should answer your question.

Constraint / dataPolicy on Email Address