Can anyone provide a regular expression for username and password?
Username: Shouldn’t start for digit with minimum 6 character.
Password: Alphanumeric with at least 6 character.
There is no upper bound on number of characters though.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For the username, first get anything that is not a number, than any characters for at least 5 length. For multibyte chars, like é, I suggest the u modifier. For the password, use alphanumerics and at least 6 of them, and note the i modifier for case insensitivity( makes the regex shorter this way ).