0

I need a password regex that contains at least a capital letter, small letter, digit, special character and that is between 8 to 30 characters long. How can I do that?

Currently I have this code below which does not work correctly.

let passwordRegex = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[$@$!%*?&#])[A-Za-z\\d$@$!%*?&#]{8,30}"
habed
  • 161
  • 3
  • 11

0 Answers0