Re: regular exp if he

From: Date: Wed, 23 Aug 2000 21:28:29 +0000
Subject: Re: regular exp if he
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-13229@lists.php.net to get a copy of this message
Thanks guys! On Wed, 23 Aug 2000, Andreas Pour wrote: > Chris Murley wrote: > > > > Hi All > > > > i tried this code: > > > > if ( !ereg( "([a-zA-Z0-9])" , $Username) ){ > > exit; > > } > > > > it works when i set $Username="'" but if i use > > $Username="i'm cool" > > > > it says thats ok > > > > Any ideas? > > yeah, you're just requiring one alnum in the subject. You need > > ereg("^[[:alnum:]]+$", $username) > > Ciao, > > Andreas > > -- > 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 (#13229) next »