note 80552 deleted from function.preg-match by felipe

From: Date: Sun, 23 Mar 2008 22:57:07 +0000
Subject: note 80552 deleted from function.preg-match by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-137383@lists.php.net to get a copy of this message
Note Submitter: Paperweight ---- 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.

« previous php.notes (#137383) next »