I am writing the regex for validating password in Javascript. The constraints are:
- Password must contain at least one uppercase character
- Password must contain at least a special character
With trial and error and some searching on the net, I found that this works:
/(?=.*[A-Z]+)(?=.*[!@#\$%]+)/
Can someone please explain the part of this expression which mentions that the uppercase letter and special character can come in ANY order?