P
Psybar Phreak
hi all, was hoping someone could provide a regex for the following
situation - im pulling my hair out
thanks
PP
situation - im pulling my hair out
thanks
PP
Psybar said:hi all, was hoping someone could provide a regex for the following
situation - im pulling my hair out
Q) password needs to contain at least one number and have a minimum length
of 6
hi all, was hoping someone could provide a regex for the following
situation - im pulling my hair out
Q) password needs to contain at least one number and have a minimum
length of 6
Evertjan. said:Psybar Phreak wrote on 27 sep 2003 in comp.lang.javascript:hi all, was hoping someone could provide a regex for the following
situation - im pulling my hair out
Q) password needs to contain at least one number and have a minimum
length of 6
[If this is a school test, you take the credit, but not earn it]
function testing(x){
return /\d/.test(x) && /\S{6,}/.test(x)
}
document.write(testing("asdasdd4")+"<br>")
document.write(testing("asdasdZZ")+"<br>")
document.write(testing("dd4")+"<br>")
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.