note 65885 added to language.types.array
| From: | benjcarsonatdigitaljunkiesdotca at osu1 dot php dot net | Date: | Tue, 09 May 2006 20:46:42 +0000 |
| Subject: | note 65885 added to language.types.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-110964@lists.php.net to get a copy of this message | ||
phoenixbytes: The regex you have posted for matching email addresses is incorrect. Among other
things, it does not allow '+' before the '@' (which is perfectly valid and can
be quite useful to separate extensions of a single address). RFC 822 [1] defines the grammar for
valid email addresses, and (the extemely long) regex implementing can be found at [2]. Even the
"Add Note" page here at php.net says:
[quote]
And if you're posting an example of validating email addresses, please don't bother. Your
example is almost certainly wrong for some small subset of cases. See this information from
O'Reilly Mastering Regular Expressions book for the gory details.
[/quote]
A note to others: please do your homework before writing another email-matching regex.
[1] http://www.ietf.org/rfc/rfc0822.txt?number=822
[2] http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html.
----
Server IP: 66.207.199.35
Probable Submitter: 68.149.207.30
----
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/language.types.array.php
Edit -- http://master.php.net/note/edit/65885
Del: integrated -- http://master.php.net/note/delete/65885/integrated
Del: useless -- http://master.php.net/note/delete/65885/useless
Del: bad code -- http://master.php.net/note/delete/65885/bad+code
Del: spam -- http://master.php.net/note/delete/65885/spam
Del: non-english -- http://master.php.net/note/delete/65885/non-english
Del: in docs -- http://master.php.net/note/delete/65885/in+docs
Del: other reasons-- http://master.php.net/note/delete/65885
Reject -- http://master.php.net/note/reject/65885
Search -- http://master.php.net/manage/user-notes.php