i didn't find another solution for this specific problem, so i hope you guys can help.
I need to test if a given password has 2 or more uppercase letters and i want to use regular expressions to do so. what i have now is this:
if (Regex.IsMatch(passw, @"([A-Z]){2,}")){
Note += 1;
}
only regular expression:
@"([A-Z]){2,}"
but with this code the programm only works if there are 2 ore more uppercase letters next to each other.
this works: aAAa
this doesn't: aAaA
but i need the latter as password can be fully random.
i searched around the web about regular expressions, but {2,} seem to be the best quantifier for the job, or am i completly wrong there?
thanks for any tipps :)