validating input
| From: | blackwater dev | Date: | Tue, 12 Apr 2005 23:42:25 +0000 |
| Subject: | validating input | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-212964@lists.php.net to get a copy of this message | ||
I want to check a string for only numbers and letters but am banging
my head with regex:
$good = "joh_'";
// Let's check the good e-mail
if (preg_match("/[a-z0-9]/", $good)) {
echo "Good";
} else {
echo "Bad";
}
This returns Good, why?
Thanks!