I've had a script running happily in Classic ASP for the past 18+
months with no issues and then all of a sudden, it stops working on my
local machine (XP Pro).

The code in question is:

dim re
set re = new RegExp

str = Replace(str, "+", " ")

re.Pattern = "%([0-9a-fA-F]{2})"
re.Global = True

Response.write re.Replace(str, GetRef("URLDecodeHex"))


I've tracked the error down to the line with the creation of the
RegExp object (set re = new RegExp) and have the error code of #424 -
Microsoft VBScript runtime error.

The code works fine when it's hosted online so I know it's an issue
with my PC but does anyone have any suggestions as to what it could
be? Are there any DLL's I can re-register?

To my knowledge, nothing has changed. No permissions, no changes to
the registry, etc.


Thanks in advance,
Joff

Re: Error 424 on RegExp Object by Richard

Richard
Sun Mar 02 18:05:45 CST 2008

Joff wrote:

> I've had a script running happily in Classic ASP for the past 18+
> months with no issues and then all of a sudden, it stops working on my
> local machine (XP Pro).
>
> The code in question is:
>
> dim re
> set re = new RegExp
>
> str = Replace(str, "+", " ")
>
> re.Pattern = "%([0-9a-fA-F]{2})"
> re.Global = True
>
> Response.write re.Replace(str, GetRef("URLDecodeHex"))
>
>
> I've tracked the error down to the line with the creation of the
> RegExp object (set re = new RegExp) and have the error code of #424 -
> Microsoft VBScript runtime error.
>
> The code works fine when it's hosted online so I know it's an issue
> with my PC but does anyone have any suggestions as to what it could
> be? Are there any DLL's I can re-register?
>
> To my knowledge, nothing has changed. No permissions, no changes to
> the registry, etc.

VBScript does not recognize the New keyword. You must use code similar to:

Set re = CreateObject("VBScript.RegExp")

--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--



Re: Error 424 on RegExp Object by Michael

Michael
Sun Mar 02 21:22:03 CST 2008

> VBScript does not recognize the New keyword. You must use code
> similar to:
> Set re = CreateObject("VBScript.RegExp")

Ummm...yes, it does. It's usually only used for instances of VBScript
defined classes. New does work (or should) with RegExp as syntactic sugar
for CreateObject("VBScript.RegExp")...

The underlying problem is probably a missing "VBScript.RegExp" progid,
possibl;t fixed with a ==> regsrv32 vbscript.dll ...


--
Michael Harris



Re: Error 424 on RegExp Object by LE

LE
Fri Mar 14 13:06:01 CDT 2008

THANK YOU. I was having a similar issue and this worked for me.


Larry

"Richard Mueller [MVP]" wrote:

> Joff wrote:
>
> > I've had a script running happily in Classic ASP for the past 18+
> > months with no issues and then all of a sudden, it stops working on my
> > local machine (XP Pro).
> >
> > The code in question is:
> >
> > dim re
> > set re = new RegExp
> >
> > str = Replace(str, "+", " ")
> >
> > re.Pattern = "%([0-9a-fA-F]{2})"
> > re.Global = True
> >
> > Response.write re.Replace(str, GetRef("URLDecodeHex"))
> >
> >
> > I've tracked the error down to the line with the creation of the
> > RegExp object (set re = new RegExp) and have the error code of #424 -
> > Microsoft VBScript runtime error.
> >
> > The code works fine when it's hosted online so I know it's an issue
> > with my PC but does anyone have any suggestions as to what it could
> > be? Are there any DLL's I can re-register?
> >
> > To my knowledge, nothing has changed. No permissions, no changes to
> > the registry, etc.
>
> VBScript does not recognize the New keyword. You must use code similar to:
>
> Set re = CreateObject("VBScript.RegExp")
>
> --
> Richard Mueller
> Microsoft MVP Scripting and ADSI
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
>

Re: Error 424 on RegExp Object by Corey

Corey
Fri Mar 14 14:03:34 CDT 2008

Did you try re-loading WSH? Maybe some other security patch hosed
the host...



On Mar 2, 11:22=A0pm, "Michael Harris" <mikhar.at.mvps.dot.org> wrote:
> > VBScript does not recognize the New keyword. You must use code
> > similar to:
> > Set re =3D CreateObject("VBScript.RegExp")
>
> Ummm...yes, it does. =A0It's usually only used for instances of VBScript
> defined classes. =A0New does work (or should) with RegExp as syntactic sug=
ar
> for CreateObject("VBScript.RegExp")...
>
> The underlying problem is probably a missing "VBScript.RegExp" progid,
> possibl;t fixed with a =3D=3D> regsrv32 vbscript.dll ...
>
> --
> Michael Harris