I need a regular expression to check that if a password contains:
- [1,6] uppercase/lowercase characters
- [1,10] digits
- [0,1] special characters
I tried multiple approach, but without success. I don't know if I can do this verify with regex. The most accurate pattern is : ^(?=(.*[a-zA-Z]){1,6})(?=(.*[0-9]){1,10})(?=(.*[!@#$%^&*()\-__+.]){0,1})
But it don't work good when I have more than 6 char, 10 digits or 1 special character.
Could anyone help me?