adapting regex for emailvalidation to accept single letter subdomains

This commit is contained in:
Klaus Leithoff 2009-02-04 14:08:43 +00:00
parent 3401b0aeb4
commit e5f45ae50c

View File

@ -61,7 +61,7 @@ class url_widget
*
* has to be used case insensitive: /i
*/
const EMAIL_PREG = '[a-z0-9][a-z0-9._-]*[a-z0-9]@([a-z0-9][a-z0-9_-]*[a-z0-9]\.)+[a-z0-9][a-z0-9_-]*[a-z0-9]';
const EMAIL_PREG = '[a-z0-9][a-z0-9._-]*[a-z0-9]@(([a-z0-9]*[a-z0-9]\.)|([a-z0-9][a-z0-9_-]*[a-z0-9]\.))+[a-z0-9][a-z0-9_-]*[a-z0-9]';
/**
* pre-processing of the extension