On Mon, 22 Apr 2002, Gregor Jaksa wrote:
> if (!eregi("^[[:alpha:]]$", $HTTP_POST_VARS["vpis_ime"]))
> echo "wrong char";
>
> why does this always return "wrong char" no matter what value is in vpis_ime
> ... i tried "blah", "242234" "bla242h" .. every single time i get "wrong
> char". im using PHP 4.1.2
The only thing that will match that regex is a single alpha character.
Try "^[[:alpha:]]+$" (I added a plus) to match one or more.
miguel
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php