From: friendica Date: Fri, 16 Dec 2011 22:31:39 +0000 (-0800) Subject: improve the email regex a bit more X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=22d59350e958e24cc3b7c49ce8ceae2e3178576e;p=friendica.git improve the email regex a bit more --- 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; }}