Groups | Blog | Home
all groups > inetserver asp components > november 2003 >

inetserver asp components : RegExp Replace Method causes Access Violation


Alex
11/14/2003 1:23:02 AM
Hi group,

I am using the VBScript RegExp object from an ASP-Page and
I got
the following debugger output, when calling the Replace()
method:

"First-chance exception at 0x77e97c5c in inetinfo.exe:
0xC0000005: Access
violation reading location 0x0000400c."

Otherwise the code is running fine. The result is correct
too.
But is it normal to have this exeption???
Or is there a bug in den VB component?!

Here is the code:

<%
Set objRegExp = New RegExp
strReplace= ""
strPattern = "[^\s\w]"
objRegExp.IgnoreCase = TRUE
objRegExp.Global = TRUE
strToReplace = "this-is-a-test."
objRegExp.Pattern = strPattern
strResult = objRegExp.Replace(strToReplace, strReplace)
Response.Write(strResult)
%>

Here are some system informations:

W2K (5.00.2195 Service Pack 3)
Internet Information Server 5
vbscript.dll (Version 5.6.0.7426)

Thanks,
Alex
11/17/2003 2:30:49 AM
Hi Luke,

I reproduced the problem on several machines!
Also with a simple VBS file.
I solved the problem in installing the newest vbscript.dll
(version 5.6.0.8515)- no more access violations. Scary, I
always thought that the RegExp-object
is supported by the older vbscript.dll versions too.
Although, thank you for the fast reply.

lukezhan NO[at]SPAM online.microsoft.com
11/17/2003 7:02:52 AM
Hi Alex,

I also can't reproduce the problem yet. From the error, it seems to be a
install or configration issue, for example, corrupted installtion for
RegExp. You may try to execute a VBS file with similar code on the computer
to confirm this.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
AddThis Social Bookmark Button