Re: Alphanumeric Strings

From: Date: Thu, 14 Sep 2000 22:59:44 +0000
Subject: Re: Alphanumeric Strings
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-16861@lists.php.net to get a copy of this message
Sweet thanks, thats what I needed. Lars, got your email too - thanks for the help :-) ----- Original Message ----- From: Jason Brooke <jason@qgl.org> To: Jason Granum <razm@assassination.org>; Lars Torben Wilson <torben@pinc.com> Cc: <php-general@lists.php.net> Sent: Thursday, September 14, 2000 4:07 PM Subject: Re: [PHP] Alphanumeric Strings > > if (!ereg("[^[:alnum:]]", $string) > echo "String only has alpha-numeric chars\n"; > > jason > > > This returns true though if the string is "This is a @#&$#@#% test" > > Alphanumeric should only be a-z 0-9 and _ correct? > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#16861) next »