Regex Expression not working for password

I am trying to make a regex expression on mockaroo for Password. I want my password to have at least 1 lowercase character, 1 uppercase character, 1 digit and 1 special character. The min length should be 8. The regex pattern I am using is:
^(?=.?[A-Z])(?=.?[a-z])(?=.?[0-9])(?=.?[#?!@$%^&*-]).{8,}$. But this isn’t giving the required results. Please help.

I updated the Password data type so that you can customize the minimum number of symbols, numbers, upper case letters, etc… This should get you what you need much easier.

1 Like