PHP preg_match every character?

r4m39z

New member
Does anybody know how to check EVERY character, character by character, in preg_match to see it they are a-Z0-9? I think I got it, but I'm not sure.

if (!preg_match("/^[a-z0-9])+$/i", $name)) {
echo 'Nmae is invalid.';
}
 
Back
Top