Hi Everyone, I am currently using this piece of code to validate wether or not an address has only letters, numbers, #, or - in it:
if (!ereg("^[A-Za-z0-9 #-]{1,20}", $_POST["address1"])) { $error = 1; $msg .= "Address must only contain letters, numbers, #, or -.<br>"; } However, if I put any valid character as the first, and then any illegal characters ([EMAIL PROTECTED], etc) after that, it passes it as ok. Can someone tell me what I am doing wrong with the regex? -Dan Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php