I want a regular expression to check that:
A password contains at least eight characters, including at least one number and includes both lower and uppercase letter
You can use the below regular expression pattern to check the password whether it matches your expectations or not.
((?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&*()]).{8,20})