From bb19e0bb45ef948138e2d86867375bde8d4aeb70 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Wed, 31 Jul 2002 08:01:34 +0000 Subject: [PATCH] - fixing email regular expression. --- modules/user.module | 2 +- modules/user/user.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/user.module b/modules/user.module index 016d4374308..46ea845b979 100644 --- a/modules/user.module +++ b/modules/user.module @@ -187,7 +187,7 @@ function user_validate_mail($mail) { ** allowed. */ - if ($mail && !eregi("^[_+\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $mail)) { + if ($mail && !eregi("^[a-z0-9]+([_.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+\\.[a-z]{2,4}$")) { return t("The e-mail address '$mail' is not valid."); } } diff --git a/modules/user/user.module b/modules/user/user.module index 016d4374308..46ea845b979 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -187,7 +187,7 @@ function user_validate_mail($mail) { ** allowed. */ - if ($mail && !eregi("^[_+\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$", $mail)) { + if ($mail && !eregi("^[a-z0-9]+([_.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+\\.[a-z]{2,4}$")) { return t("The e-mail address '$mail' is not valid."); } }