Re: RegExp irregularity in JScript
From: Evertjan. (exjxw.hannivoort_at_interxnl.net)
Date: 03/07/04
- Next message: Chris Barber: "Re: remote scripting"
- Previous message: Suzanne: "remote scripting"
- In reply to: Dr John Stockton: "Re: RegExp irregularity in JScript"
- Next in thread: Xlnt: "Re: RegExp irregularity in JScript"
- Messages sorted by: [ date ] [ thread ]
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)
- Next message: Chris Barber: "Re: remote scripting"
- Previous message: Suzanne: "remote scripting"
- In reply to: Dr John Stockton: "Re: RegExp irregularity in JScript"
- Next in thread: Xlnt: "Re: RegExp irregularity in JScript"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|