Solutions have already been presented, but note that your
solution checks for more restrictive passwords than your requirements. Your regex disallows for instance
1d!Ot, which isn't disallowed by your requirements.
Abigail
Comment on Re: regex elegance contest - validate a pw