/^(?=.*\d)(?=.*[!@&.$#]).{7,16}$/
It should allow between 7 and 16 characters and contain at least 1 numeric character and 1 special character and can’t start with a number. I tried testing it but it does not work?
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.
The only thing that I assume “does not work”, which is a bit of a vague problem description to be honest, is the fact that it CAN start with a digit. Besides that, it works as you described.
Fix it like this:
A short explanation (in case you did not write the regex yourself):