Re: Reg expression for password complexity requirements



In comp.lang.javascript message <7d6d7115-5311-4c3f-a0d2-ae3b96ca77b7@x6
g2000vbg.googlegroups.com>, Wed, 27 May 2009 07:53:38,
shimshim@xxxxxxxxx posted:

I need help in finding reg expression for password complexity
requirements.

Sounds like a specification written by a person of limited intellect.

The requirements are:

· No dictionary words;

Which dictionary? A pocket one? The Full Oxford English Dictionary? A
foreign dictionary?

· At least 1 character must be alphabetical and at least 1 character
must be a digit or a non-alphanumeric character;

Which characters constitute the alphabet? Most dictionaries contain
letters outside the set A to Z. Some languages do not include all of
those letters.

How large is the possible character set? That influences how coding
should be done. Sholes began with 35; JavaScript String.charAt can give
65536 different results, IIRC.

· At least 6 characters must occur only once in a password;
· Passwords cannot contain any string that is also contained in the
username;

That means that no characters can match, since a string can be one
character long.

· Passwords cannot contain any common strings such as a sequential
series of letters (abcd) or a sequential series of numbers (1234) or
pattern of numbers (2468).

Hoe about LNER, 4468, 126, A4, 462, 19380703; 26536, 18285; 20871? All
are well-known, to some. How about 112263? How about SPQR? How about
285714? Your criterion is far too ill-defined. And who would have
considered "Obama" to be a well-known string a decade ago?



Those of your requirements that are implementable are easily done
without using RegExps; for none of those do RegExps seem particularly
useful.

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
.



Relevant Pages

  • Re: English - Japanese Electronic Dictionary
    ... J-J dictionaries are useful if they have a jump feature that allows ... up a character across all available dictionaries, ... I'm running both the Sharp and Seiko models noted in the article ... As I recall from a few months back, there was talk about buying a PDA ...
    (sci.lang.japan)
  • Re: Beginners book?
    ... system corresponds to the references in Jorden's text book and you ... not the case for all character dictionaries) and it shows how each ... character is formed by stroke order. ...
    (sci.lang.japan)
  • Re: Beginners book?
    ... Phil Yff wrote: ... not the case for all character dictionaries) and it shows how each ... character is formed by stroke order. ... Too bad I already spent the Amazon gift certificate I was given recently ...
    (sci.lang.japan)
  • Re: Beginners book?
    ... Phil Yff wrote: ... not the case for all character dictionaries) and it shows how each ... character is formed by stroke order. ... Too bad I already spent the Amazon gift certificate I was given recently ...
    (sci.lang.japan)
  • Re: which is the best japanese dictionary
    ... I wouldn't recommend this yet...) ... there are various dictionaries ... designed for native Japanese speakers that include this information ... character can also be looked up by it's On-yomi, ...
    (sci.lang.japan)