It would probably be more efficient to do the task in stages. In particular, checking the length before looking at the contents.
Then, trim($password,'A..Za..z0..9') should equal "" if upper/lower letters and digits are the only characters allowed.
After that, if you're talking PHP5, there's strpbrk, which might be usable. If not, then $password should be different from both strtolower($passwer) and strtoupper($password), and finally preg_match('/\d/',$password) should find a match.
I'm certain that it could all be done with a single preg_match(), but I'm almost as certain that it would be ugly and not as intuitive. Let's see:
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])[a-zA-Z0-9]{6,12}$/
Okay, so maybe not that ugly. Haven't looked at performance.
PS: If you allow only 12-character passwords, and sharply-limited character sets, I don't like it 🙂