develooper Front page | perl.fwp | Postings from December 2001

test a password string for correctness

Thread Next
From:
Kim Schulz
Date:
December 13, 2001 05:29
Subject:
test a password string for correctness
Message ID:
20011213142914.77d39ba8.kim@schulz.dk
hi guys

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)

I needed 5 lines of code how about you guys?

later..
Kim Schulz

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About