Re: RegExp irregularity in JScript

From: Roland Hall (nobody_at_nowhere)
Date: 03/05/04


Date: Fri, 5 Mar 2004 13:47:03 -0600


"Steve Fulton" wrote in message
news:%23iM7ZHrAEHA.2720@TK2MSFTNGP11.phx.gbl...
:
: From changing the minimum number of characters in the ".{4,8}" portion of
the
: pattern, it looks like the regular expression succeeds only if the *last
class*
: of characters (i.e. digits, lower case, upper case) in the string is at
least 4
: characters long. All three strings match if the pattern is ".{1,8}"; the
first
: two pass if it's ".{3,8}". What makes this behavior puzzling is if you
capture
: the pattern as a submatch (e.g. "(.{1,8})") the entire string is returned,
not
: just the end of the string!
:
: This looks like a bug in Microsoft's regular expression implementation (it
fails
: in VBScript as well). I'd tell them about it but they've halted
development of
: ActiveX scripting, and since this isn't a security issue I doubt a fix
will be
: forthcoming.

I couldn't get the sub to work either.



Relevant Pages

  • Re: Expert script (.bat) writers help needed (strip double-quote from string)
    ... Sets or returns the regular expression pattern being searched for. ... Always a RegExp object variable. ... May include any of the regular expression characters defined in the table in the Settings section. ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Extract letters and numbers from string
    ... While the Like operator patterns cannot begin to compare to those from a Regular Expression parser, they are still quite flexible and you can still get quite complex with them. ... What the pattern does is insure the text in the variable Value is made up of nothing but digits. ... The exclamation mark inside the square brackets says to look for characters NOT in the range 0 through 9, the asterisks on either side says to look for this non-digit anywhere within the text contained in the Value variable. ... > Public Function AlphaNumeralsAs String ...
    (microsoft.public.excel.programming)
  • Re: Extract letters and numbers from string
    ... While the Like operator patterns cannot begin to compare to those from a ... exclamation mark inside the square brackets says to look for characters NOT ... the Like pattern tests can all be included into a single pattern test... ... Public Function AlphaNumeralsAs String ...
    (microsoft.public.excel.programming)
  • Re: RegExp irregularity in JScript
    ... we believe the VBScript Regular Expression class (version 1.0 through ... It does not however, limit the string minimum 4, maximum 8 characters. ... Obviously the first test should test the length of the string, minimum 4, ...
    (microsoft.public.scripting.jscript)
  • Re: Usename regex
    ... Think of a string, ... Regular expression benchmark ... MS MAX AVG MIN DEV INPUT ... If the textbox in question is limited to say 16 characters you'd ...
    (microsoft.public.dotnet.framework.aspnet)