Re: RegExp irregularity in JScript

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Evertjan. (exjxw.hannivoort_at_interxnl.net)
Date: 03/07/04


Date: 07 Mar 2004 14:47:55 GMT

Dr John Stockton wrote on 06 mrt 2004 in
microsoft.public.scripting.jscript:

> JRS: In article <Xns94A4B0D4A90AFeejj99@194.109.133.29>, seen in
> news:microsoft.public.scripting.jscript, Evertjan. <exjxw.hannivoort@int
> erxnl.net> posted at Sat, 6 Mar 2004 16:22:49 :-
>
>>if ( /\d/.test(pw) &&
>> /[a-z]/.test(pw) &&
>> /[A-Z]/.test(pw) &&
>> /^.{4,8}$/.test(pw)
>>) alert('accepted');
>
> There should be a test on the overall set of characters used (more so
> when the minimum length is greater). Characters which might cause error
> should normally be barred; allowing characters outside 33..126 seems
> very unwise, and it might be better to use /\w{4,8}/ for the
> last test.
>

/^\w{4,8}$/

good point, John,

but this option is not within the OP's constraints.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Relevant Pages

  • Re: Line too long ???
    ... After copying everuthing in the Notepad, savin the file and renaming it into ..pas, it looked all right, but after a few other adjustments to the same lines consisting mainly in lines camcellations, I got in the same intial situation, So I thoght perhpas the problem was not cutting and pasting, but deleting, since I was having problems even deleting a piece of a line ... "Dr J R Stockton" ha scritto nel messaggio ... "Line too long (more then 1023 characters)" ... John Stockton, Surrey, UK. ...
    (comp.lang.pascal.delphi.misc)
  • Re: cant pass % wildcard variable in querystring
    ... Bryan Russell wrote on 11 mrt 2004 in ... > characters included in the variable though. ... (Please change the x'es to dots in my emailaddress) ...
    (microsoft.public.inetserver.asp.general)
  • Re: zero padding
    ... Add 100000 to i, convert to string, take the last 5 of the 6 characters. ... John Stockton, Surrey, UK. ...
    (microsoft.public.scripting.vbscript)
  • Re: Standard newline character
    ... HTML has no such requirement. ... contain no newline characters whatsoever, ... John Stockton, Surrey, UK. ...
    (comp.infosystems.www.authoring.html)
  • Re: Form field
    ... > was wondering if it is possible to set a min number of characters? ... Not with serverside ASP. ... (Replace all crosses with dots in my emailaddress) ...
    (microsoft.public.inetserver.asp.general)