From e5f45ae50c85d4520139379599a10941127a27dc Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 4 Feb 2009 14:08:43 +0000 Subject: [PATCH] adapting regex for emailvalidation to accept single letter subdomains --- etemplate/inc/class.url_widget.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/inc/class.url_widget.inc.php b/etemplate/inc/class.url_widget.inc.php index f61999eb4b..16bdb7d5dd 100644 --- a/etemplate/inc/class.url_widget.inc.php +++ b/etemplate/inc/class.url_widget.inc.php @@ -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