$check = $_POST['n_passwort'] . $_POST['n_passwort'] . $_POST['n_passwort'];if (false === preg_match ('#[A-Z].*[a-z].*[0-9]#', $check)) { // error}