Answer the question
In order to leave comments, you need to log in
What characters are allowed in the login (username)?
There are 2 options:
// Буквы латинского алфавита и цифры:
$regex_name1 = '/^[a-zA-Z0-9]+$/';
// Все, что в первом варианте, дефис (-), точка (.), знак нижнего подчеркивания (_):
$regex_name2 = '/^[a-zA-Z0-9-._]+$/';
$regex_name3 = '/^(?![_.])(?!.*[-_.]{2})[a-zA-Z0-9-._]+(?<![-_.])$/';
Answer the question
In order to leave comments, you need to log in
xpoint.ru/forums/programming/theory_algorythms/thr...
xpoint.ru/forums/internet/theory/thread/22534.xhtml
there is
no standard for this. the emphasis in any checks is on the fact that the user would not enter a login/password in the style ^vasya_$123#*& and then forget their logins/passwords.
the standard alphabet a-z0-9 with a couple of characters to separate (- or _) will be enough for many millions of users.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question