I'm trying to get this but not quite there. I want to allow the following characters. A-Za-z0-9!@#$%&()*;:_.'/\ 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("/^[-A-Za-z0-9!@#%&\(\)\*;:_.\'\$ ]+$/", $string)) { Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php