note 92728 added to function.preg-match
| From: | suit dot 2009 at rebell dot at | Date: | Thu, 06 Aug 2009 10:49:38 +0000 |
| Subject: | note 92728 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159142@lists.php.net to get a copy of this message | ||
Reno's expression is still wrong.
The domain-part may contain lots of characters for IDN. IP adresses in the domain part are allowed.
In local-part are more characters allowed too but specific combinations are forbidden. Check RFC
2822 and RFC 2821.
"foo bar"@example.com is valid
foo\@bar@example.com is valid
$?^_`.!#{|}%&'*+-/=~@example.com is also valid e-mail-address (ok, quite uncommon example)
but
foo.@example.com is invalid, dot at beginning and end of the string is not allowed - but Reno's
expression would match.
an e-mail adress should not be longer than 256 characters (or 64 in local part, 255 in domain part)
since its limited by SMTP - check RFC 5321
Of course you should check RFC 2606 (Section 3) too - domain.tld or host.tld are not good as
example-domains. Use example.com / org / net (for domains) or .invalid / . example (for top level
domains).
----
Server IP: 64.71.164.2
Probable Submitter: 81.223.129.178
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- https://master.php.net/note/edit/92728
Del: integrated -- https://master.php.net/note/delete/92728/integrated
Del: useless -- https://master.php.net/note/delete/92728/useless
Del: bad code -- https://master.php.net/note/delete/92728/bad+code
Del: spam -- https://master.php.net/note/delete/92728/spam
Del: non-english -- https://master.php.net/note/delete/92728/non-english
Del: in docs -- https://master.php.net/note/delete/92728/in+docs
Del: other reasons-- https://master.php.net/note/delete/92728
Reject -- https://master.php.net/note/reject/92728
Search -- https://master.php.net/manage/user-notes.php