I'm working on a strength password test, and I'm trying to check if the password has upper, and lower, case characters. I'm using two regular expressions, and they're almost working; with the code just here:
var upper = false;
var lower = false;
var upperCase= new RegExp('[^A-Z]');
var lowerCase= new RegExp('[^a-z]');
if (password.match(upperCase )){
upper = true;
}
if (password.match(lowerCase)){
lower = true;
}
When I'm typing numbers, or just a digit, like "1", upper and lower become true.
I'm not really good with regex, did I made a mistake?