<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi Amit,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>let me have a shot at this... (lets see if i can
impress the masters :-)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>For the format validation i believe youŽll need 2
regexps</FONT></DIV>
<DIV><FONT face=Arial size=2>you can use for validation 3 and 4 <FONT
face="Times New Roman" size=3>something like : </FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman"
size=3>/[^a-z0-9A-Z@._] |([0-9a-zA-Z])\1{3,}/ (<-donŽt know if this works
:-)</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>"if not any of
these or repeat a char or number 3 or more times...." then
error</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2>and for 2 and 3 </FONT></DIV>
<DIV><FONT face=Arial size=2>/(.*[<FONT face="Times New Roman"
size=3>a-zA-Z</FONT>].*[0-<FONT face="Times New Roman"
size=3>9</FONT>].*)|(.*[0-<FONT face="Times New Roman" size=3>9</FONT>].*[<FONT
face="Times New Roman" size=3>a-zA-Z</FONT>].*)/
two groups to have the situations num char and char num....</FONT></DIV>
<DIV><FONT face=Arial size=2>"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</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>for size you can use /^.{8,24}/ (anything ,
repeated 8 to 24 times)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Hope this is any help...</FONT></DIV>
<DIV><FONT face=Arial size=2>Allard</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=a1_uchat@yahoo.com href="mailto:a1_uchat@yahoo.com">AMIT UCHAT</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=javascript@LaTech.edu
href="mailto:javascript@LaTech.edu">[JavaScript List]</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, June 29, 2004 1:33
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Javascript] RegEx for Password
w/ spl rules</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT
face=Arial size=2></FONT><BR></DIV>
<DIV>Hi </DIV>
<DIV>I have been trying to Develop RegEx for a Password authentication
with following rules:</DIV>
<DIV>1) Must be between 8 - 24 characters</DIV>
<DIV>2) Should have atleast 1 digit</DIV>
<DIV>3) Should have atleast 1 Alphabatic Character</DIV>
<DIV>3) Valid characters are [a-z0-9A-Z@._]</DIV>
<DIV>4) Any Characters cannot repeat more then thrice e.g. Password is
"mynaaaame1" is </DIV>
<DIV> invalid because character 'a' repeated more then thrice
consecutively.</DIV>
<DIV> </DIV>
<DIV>Rule # 1 is taken care of in password textbox by limiting textbox sixe
with min=8 and max=24.</DIV>
<DIV> </DIV>
<DIV>Rule # 2 & 3: ^[a-z0-9A-Z@._]+$</DIV>
<DIV> </DIV>
<DIV>Rule # 4: How do I apply it to ^[a-z0-9A-Z@._]+$ RegEx?</DIV>
<DIV> </DIV>
<DIV>Any help/Hints/Direction be much appereciated.</DIV>
<DIV> </DIV>
<DIV>Adios,</DIV>
<DIV>Amit</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<P>
<HR SIZE=1>
Do you Yahoo!?<BR><A
href="http://us.rd.yahoo.com/mail_us/taglines/100/*http://promotions.yahoo.com/new_mail/static/efficiency.html">New
and Improved Yahoo! Mail</A> - 100MB free storage!
<P>
<HR>
<P></P>_______________________________________________<BR>Javascript mailing
list<BR>Javascript@LaTech.edu<BR>https://lists.LaTech.edu/mailman/listinfo/javascript<BR></BLOCKQUOTE></BODY></HTML>