From 22d59350e958e24cc3b7c49ce8ceae2e3178576e Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 16 Dec 2011 14:31:39 -0800 Subject: [PATCH] improve the email regex a bit more --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/text.php b/include/text.php index 5e9c393362..d6b3ceeab4 100644 --- a/include/text.php +++ b/include/text.php @@ -635,7 +635,7 @@ function search($s,$id='search-box',$url='/search',$save = false) { if(! function_exists('valid_email')) { function valid_email($x){ - if(preg_match('/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x)) + if(preg_match('/^[_a-zA-Z0-9\-\+]+(\.[_a-zA-Z0-9\-\+]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/',$x)) return true; return false; }}