note 80552 added to function.preg-match
| From: | Paperweight at osu1 dot php dot net | Date: | Tue, 22 Jan 2008 05:03:56 +0000 |
| Subject: | note 80552 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135302@lists.php.net to get a copy of this message | ||
This fixes BK's bugs when checking an email address:
"/^([a-z0-9._-](\+[a-z0-9])*)+@[a-z0-9.-]+\.[a-z]{2,6}$/i"
Features:
-Accepts + addressing, and must have characters after the +
-No special characters such as: ! # $ % & ' * / = ? ^ ` { | } who needs 'em!
-No spaces.
Caveats still remaining:
-You should use trim() on your email address first.
-Allows multiple ...... dots
-Allows dots in the .wrong places.
-Allows domain names with dashes - in the wrong places.
----
Server IP: 66.207.199.35
Probable Submitter: 24.67.76.62
----
Manual Page -- http://www.php.net/manual/en/function.preg-match.php
Edit -- https://master.php.net/note/edit/80552
Del: integrated -- https://master.php.net/note/delete/80552/integrated
Del: useless -- https://master.php.net/note/delete/80552/useless
Del: bad code -- https://master.php.net/note/delete/80552/bad+code
Del: spam -- https://master.php.net/note/delete/80552/spam
Del: non-english -- https://master.php.net/note/delete/80552/non-english
Del: in docs -- https://master.php.net/note/delete/80552/in+docs
Del: other reasons-- https://master.php.net/note/delete/80552
Reject -- https://master.php.net/note/reject/80552
Search -- https://master.php.net/manage/user-notes.php