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
I've actually just copied the first answer here and turned it into a more ux-convenient regex which needs one upper, one lower and at least 8 chars but accepts everything "in between".
This one is an example-regex which requires
IMPORTANT: This regex will also except all other characters e.g. numbers, special characters like $,#,! etc. - as long as the rules 1. to 3. match the input string
^(?=.*[a-z])(?=.*[A-Z]).{8,}$
Mind the "." alomst at the end of the regex. This will match almost any (and afaik any readable) character