On Thu, 13 Dec 2001 14:29:14 +0100, Kim Schulz wrote:

>How short kan you make a program (oneliner?) that:
>
>* checks if a password is 5 characters long or more
>* checks if the password contains at least 3 alpha chars (a-zA-Z)
>* checks if the password contains at least 2 numbers (0-9)

If a password contains at least 3 letters and 2 digits, than it has to
be at least 5 character long.

        /^(?=.*\d.*\d)(?=.*[a-z].*[a-z].*[a-z])/i

Short enough?

-- 
        Bart.

Reply via email to