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 found many problems here, so I made my own.
Here it is in all it's glory, with tests:
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*([^a-zA-Z\d\s])).{9,}$
https://regex101.com/r/DCRR65/4/tests
Things to look out for:
\w
because that includes _
, which I'm testing for.