Mrhappiness covered #4 in the last regex. %[a-z0-9]+[0-9]+[a-z0-9]+$%i would mean "at least one letter/number followed by at least one number followed by at least one letter/number." So his function should do it for you. However instead of using a regex to make sure the case is varied, like he does:
//check mixture of of upper and lowercase letters
if (preg_match('%[a-z]+%', $pass) ^ preg_match('%[A-Z]+%', $pass))
return false;
...you can use simple string functions, which should be marginally faster:
// check mixture of upper and lowercase letters
if (
($pass == strtoupper($pass)) || // i.e. it's all uppercase
($pass == strtolower($pass)) // i.e. it's all lowercase
)
return false;