Re: Reg expression for password complexity requirements
- From: Dr J R Stockton <reply0922@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 May 2009 20:17:16 +0100
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)
.
- References:
- Reg expression for password complexity requirements
- From: shimshim
- Reg expression for password complexity requirements
- Prev by Date: Re: Looking for Help with FAQ
- Next by Date: make your computer money making machine
- Previous by thread: Re: Reg expression for password complexity requirements
- Next by thread: Re: Reg expression for password complexity requirements
- Index(es):
Relevant Pages
|