This is the regex for email validation in Struts:

\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)\*
\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|
museum|name|nato|net|org|pro|tel|travel|xxx)$\\b

I had a report of this failing for a user with an umlaut email
( shläg...@example.com ).  My regex is not very good, but the above
mentioned regex doesn't seem to allow said characters.

However, International characters above U+007F are permitted by RFC
6531 :

http://sphinx.mythic-beasts.com/~pdw/cgi-bin/emailvalidate



What is your view on this? Could this regex be incorrect and miss out
any special characters?

Miguel Almeida

Reply via email to