I am trying to get one regular expression that does the following:
- makes sure there are no white-space characters
- minimum length of 8
- makes sure there is at least:
- one non-alpha character
- one upper case character
- one lower case character
I found this regular expression:
((?=.*[^a-zA-Z])(?=.*[a-z])(?=.*[A-Z])(?!\s).{8,})
which takes care of points 2 and 3 above, but how do I add the first requirement to the above regex expression?
I know I can do two expressions the one above and then
\s
but I'd like to have it all in one, I tried doing something like ?!\s
but I couldn't get it to work. Any ideas?