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-----
>From: Jack Dempsey [mailto:[EMAIL PROTECTED]]
>Try searching for anything that's not a word character:
>if(preg_match("/\W/",$mystring))
>that should return true if it matches anything except for a letter,
>number, or _...

Will likely switch to that syntax for brevity sake.

>your regex didn't work because you didn't use /'s at the beginning and
>end of your regex...

caught this one after further review of the regex documentation


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to