Email validation using MATCH (RegEx)


Hi All,
I tired to validate email ids using RegEx (using Match). The best I could come up so far is as follows:

^[a-zA-Z0-9!#$%&\’+/=?^_{|}~-][a-zA-Z0-9!.#$%&\’*+/=?^_{|}~-][email protected][a-zA-Z0-9-]+{[?.]+[a-zA-Z0-9-]+}$

The above expression DOES NOT cater for the following email formats: (There could be more that I haven’t thought of)
[email protected]
[email protected]
[email protected]
[email protected]

Please share if you can optimise the above RegEx expression and/or if you have a way to deal with the email formats mentioned above?

I had an earlier post about Match (RegEx).




I made a little progress from yesterday. I am also attaching the test program (C10 app) for anybody to try.

Revised Expression:

My test application looks like this: (765.8 KB)




I just use the following - not as complicated as yours so may not catch all but works for my needs

Notice I use UPPER to eliminate all the a-zA-Z duplication you have.

  IF ~MATCH(UPPER(wrkEmail),'^[-A-Z0-9.!#$%&''*+-/=?^_`{{|}~][email protected]{{[-A-Z0-9.]+\.}+[A-Z][A-Z]+$',Match:Regular)


Thanks Kevin for the UPPER function suggestion. But, I didn’t realise that I am calling MATCH with MATCH:Regular + Match:NoCase as this test app was done a few years ago. Therefore a-zA-Z is already being ignored.

Took the last bit from your suggestion.

Latest Expression:

This validates all the emails I have in my list.



I have been using for a while for this, is working nicely.

See the big title about half way down the page. General Email Regex (RFC 5322 Official Standard)


Richard Bryce