Re: [PHP] regex for cleaning up username

2001-07-22 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Dave) wrote: > Am partially successfull after taking a further look into things. the > following > (while ugnly) correctly catches everything except the \ character for some > reason. ideas? > > if(preg_match("/['".'" ,!@#$%\^&*()+=\/\\:;?|]

RE: [PHP] regex for cleaning up username

2001-07-22 Thread Dave
Am partially successfull after taking a further look into things. the following (while ugnly) correctly catches everything except the \ character for some reason. ideas? if(preg_match("/['".'" ,!@#$%\^&*()+=\/\\:;?|]/',$MyString)){ # echo error, character found } >-Original Message

[PHP] regex for cleaning up username

2001-07-22 Thread Dave
Cannot seem to get a regex to check a string for the following space tab ' " ! @ # $ % ^ & * ( ) + = : ; / \ if(preg_match('[\'" ,!@#$%\^&*()+=:;/\\]',$mystring)) simply need a true if it contains any of these characters (for cleaning up usernames). thinking it may be easier to parse f