Yeah it will work, it allow characters for a-z A-Z underscore and numbers in the range 0-9.
Hence the
a-zA-Z_0-9
but i believe that
PHP Code:
if (!preg_match("/^\w+$/", $username)) {
eval("standarderror(\"Invalid Characters you can only use a-z, 1-9 or an underscore in your username.\");");
exit;
}
as \w represents word in perl thought it depends on locale settings