I have a regex that is supposed to allow at least 1 number and 1 capital aswell as being between 4 and 15 characters. I hard coded some normal data to test but it always returns false.
public static bool PasswordValid(string password)
{
Regex regex = new Regex(@"^(?=.*\d)(?=.*[a - z])(?=.*[A - Z]).{4,15}$");
return regex.IsMatch("Password1");
}