note 67998 added to function.preg-match
| From: | najeli at gmail dot com | Date: | Sun, 09 Jul 2006 18:03:38 +0000 |
| Subject: | note 67998 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-114610@lists.php.net to get a copy of this message | ||
A little comment to lcvalentine mail validation expression - it recognizes emails like
"user@fo.com" as non valid, but there are some valid ones (at least in Poland, ex. wp.pl,
o2.pl etc.).
After changing {1,61} to {0,61} everything works fine, I hope.
<?php
preg_match( "/^
[\d\w\/+!=#|$?%{^&}*`'~-]
[\d\w\/\.+!=#|$?%{^&}*`'~-]*@
[A-Z0-9]
[A-Z0-9.-]{0,61}
[A-Z0-9]\.
[A-Z]{2,6}$/i", 'user@subdom.dom.tld'
);
?>
(remove breaks)
----
Server IP: 195.136.184.34
Probable Submitter: 193.189.116.5
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- http://master.php.net/note/edit/67998
Del: integrated -- http://master.php.net/note/delete/67998/integrated
Del: useless -- http://master.php.net/note/delete/67998/useless
Del: bad code -- http://master.php.net/note/delete/67998/bad+code
Del: spam -- http://master.php.net/note/delete/67998/spam
Del: non-english -- http://master.php.net/note/delete/67998/non-english
Del: in docs -- http://master.php.net/note/delete/67998/in+docs
Del: other reasons-- http://master.php.net/note/delete/67998
Reject -- http://master.php.net/note/reject/67998
Search -- http://master.php.net/manage/user-notes.php