matching
Posted: Wed Mar 22, 2006 1:31 am
All of these seem to match, when they shouldn't! what am i doing wrong?
Code: Select all
if(!preg_match("#[\w]+#i","scott%")){
die("does not match");
} ELSE {
die("matches");
}
if(!preg_match("#\w+#i","scott%")){
die("does not match");
} ELSE {
die("matches");
}
if(!preg_match("#[a-z0-9_]+#i","scott%")){
die("does not match");
} ELSE {
die("matches");
}