Use REGEX to filter emails | Community
Skip to main content
RaulOcana
Level 3
November 6, 2019
Solved

Use REGEX to filter emails

  • November 6, 2019
  • 2 replies
  • 6463 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

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

2 replies

Raj_Ganta-1
Level 5
November 6, 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

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
November 6, 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