Feedback (2 comments)
Please post any feedback, live examples, bugs, features and change requests here.
-
. - OuT
2010-05-11 22:40:11
this is even better :
case-sensitive version :
if (password.match(/^[a-zA-Z]+$|^[0-9]+$/) )
case-insensitive version :
if (password.match(/^[a-z]+$|^[A-Z]+$|^[0-9]+$/) )
I let you choose which one to use
cheers -
regex - OuT
2010-05-10 08:28:43
Hi, found a little bug
lines 202, 203 :
//password is just a numbers or chars
if (password.match(/^\w+$/) || password.match(/^\d+$/) )
since \w means [a-zA-Z0-9_], I think the correct test would instead be :
if (password.match(/^[a-zA-Z]+$/) || password.match(/^\d+$/) )
or, because I personally think it is less confusing (as you demonstrated ;) :
if (password.match(/^[a-zA-Z]+$/) || password.match(/^[0-9]+$/) )
regards