[thelist] [php] regexp help

Paul Bennett paul at web-business-pack.com
Mon Oct 18 22:49:55 CDT 2004


one day I'm going to buy that OReilly book, but until then:

Can someone tell me why this check:

if(preg_match("/^[a-zA-Z0-9 -\']+$/i", $value))
   {$response['name'] = true;}
       
else {$response['name'] = false;}

evaluates to true when $value is something like 'test ^%' - which should 
return false?

thx,
Paul B



More information about the thelist mailing list