[Javascript] RegEx for Password w/ spl rules
allard schripsema
allard-schripsema at procergs.rs.gov.br
Tue Jun 29 12:58:10 CDT 2004
Hi Amit,
let me have a shot at this... (lets see if i can impress the masters :-)
For the format validation i believe you´ll need 2 regexps
you can use for validation 3 and 4 something like :
/[^a-z0-9A-Z at ._] |([0-9a-zA-Z])\1{3,}/ (<-don´t know if this works :-)
"if not any of these or repeat a char or number 3 or more times...." then error
and for 2 and 3
/(.*[a-zA-Z].*[0-9].*)|(.*[0-9].*[a-zA-Z].*)/ two groups to have the situations num char and char num....
"If any-no-thing char any-no-thing number any-no-thing OR any-no-thing number any-no-thing char any-no-thing then OK
for size you can use /^.{8,24}/ (anything , repeated 8 to 24 times)
Hope this is any help...
Allard
----- Original Message -----
From: AMIT UCHAT
To: [JavaScript List]
Sent: Tuesday, June 29, 2004 1:33 PM
Subject: [Javascript] RegEx for Password w/ spl rules
Hi
I have been trying to Develop RegEx for a Password authentication with following rules:
1) Must be between 8 - 24 characters
2) Should have atleast 1 digit
3) Should have atleast 1 Alphabatic Character
3) Valid characters are [a-z0-9A-Z at ._]
4) Any Characters cannot repeat more then thrice e.g. Password is "mynaaaame1" is
invalid because character 'a' repeated more then thrice consecutively.
Rule # 1 is taken care of in password textbox by limiting textbox sixe with min=8 and max=24.
Rule # 2 & 3: ^[a-z0-9A-Z at ._]+$
Rule # 4: How do I apply it to ^[a-z0-9A-Z at ._]+$ RegEx?
Any help/Hints/Direction be much appereciated.
Adios,
Amit
------------------------------------------------------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
------------------------------------------------------------------------------
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20040629/1774bbd0/attachment.htm>
More information about the Javascript
mailing list