I have a simple regular expression to check a username:
preg_match(\'/(*UTF8)^[[:alnum:]]([[:alnum:]]|[ _.-])+$/i\', $username);
In local t
Try it by describing the characters by its Unicode character properties:
preg_match('/^\p{L}[\p{L} _.-]+$/u', $username)