Here is the deal

i searched this forum and found a similar topic.
But the script didn't work for me and i dont wanna weak up the ghosts

if (!preg_match("/[a-z0-9]/i", $username){
print "Username field has invalid characters!";
exit;
}
Thats a code from "HuggieBear"
The thing is, script works for me in a way that it detects invalid characters but ONLY if all characters are invalid.
If i would insert as username "##$$" it would print "Username field has invalid characters!"
But if i insert "##C2" it would consider it as a valid character cuz of C and 2
With other words, i am searching for a script that would detect if it has ANY invalid character anywhere, no matter if valid characters were inserted.
Any help would be nice

thanks
