View Single Post
Old 01-18-2006, 04:59 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
some of those characters are regular expression characters and need to be escaped with a backslash. this should work.

PHP Code:
if ( preg_match("/[\.\*$?\"\/\|\\:<>]/"$text) ) {
    echo 
"match";
} else {
    echo 
"no match";

sde is offline   Reply With Quote