I'm trying to get this but not quite there. I want to allow the following
characters.

[EMAIL PROTECTED]&()*;:_.'/\ and a space.

Is there a special order these need to be in or escaped somehow. For
example, if I just allow _' the ' is fine, if I add the other characters,
the ' gets preceded by a \ and an error is returned. If I take the ' out of
the sting below it works fine, I get no errors returned. I am also using
stripslashes on the variable.

This is my code. (although I have tried various things with it trying to get
it right)

if(preg_match("/[EMAIL PROTECTED]&\(\)\*;:_.\'\$ ]+$/", $string)) {

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to