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
  • 201
  • 4
  • 12

0 Answers0