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 7 4441
"strReplace= "" "
^^Your replacing nothing
Assuming the ASP replace function is the same as the VB one, it should be;
strResult = Replace(Expression, strToReplace, strReplace)
Where expression is the string itself. E.g. if you wanted to replace
"I went to the park today"
With
"I went to the park yesterday"
It would be
strResult = Replace("I went to the park today", "today", "yesterday")
--
Regards
Steven Burn
Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Alex <ka*******@eurobase.lu> wrote in message
news:0a****************************@phx.gbl... 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
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:u7**************@TK2MSFTNGP09.phx.gbl... "strReplace= "" "
^^Your replacing nothing
Assuming the ASP replace function is the same as the VB one, it should
be; strResult = Replace(Expression, strToReplace, strReplace)
Where expression is the string itself. E.g. if you wanted to replace
"I went to the park today"
With
"I went to the park yesterday"
It would be
strResult = Replace("I went to the park today", "today", "yesterday")
--
Regards
Steven Burn Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer: I know I'm probably wrong, I just like taking part ;o) Alex <ka*******@eurobase.lu> wrote in message news:0a****************************@phx.gbl...
You are wrong, but that's for participating. ;-p
The OP is using the Replace method of the RegExp object, not the
VBScript Replace function.
HTH
-Chris Hohmann
"Alex" <ka*******@eurobase.lu> wrote in message
news:0a****************************@phx.gbl... 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?!
Most likely component related. Here's a link: www.aspfaq.com/2355
HTH
-Chris Hohmann
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl... You are wrong, but that's for participating. ;-p
That should read, "thanks for participating..."
hehe, after the day I am having, I kinda figured I would be (had an
extremely bad fortnight cause of my cr_ppy ISP and doesn't look like it's
gonna get better any time soon)
--
Regards
Steven Burn
Ur I.T. Mate Group www.it-mate.co.uk
Keeping it FREE!
Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Chris Hohmann <no****@thankyou.com> wrote in message
news:Of**************@TK2MSFTNGP12.phx.gbl... "Chris Hohmann" <no****@thankyou.com> wrote in message news:%2****************@TK2MSFTNGP11.phx.gbl...
You are wrong, but that's for participating. ;-p
That should read, "thanks for participating..."
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.)
Thanks all for the participation!
I solved the problem in installing the newest vbscript.dll
(version 5.6.0.8515)
Alex This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: RobG |
last post by:
I'm messing with getPropertyValue (Mozilla et al) and currentStyle (IE)
and have a general function (slightly modified from one originally
posted by Steve van Dongen) for getting style properties:...
|
by: athos |
last post by:
Hi guys,
Sounds a bit strange, however, if we could put some calculation in
stored procedure it would be quite convenient, just... where can I find
a REGEXP library for matching checking?...
|
by: Jon Maz |
last post by:
Hi All,
I want to strip the accents off characters in a string so that, for example,
the (Spanish) word "práctico" comes out as "practico" - but ignoring case,
so that "PRÁCTICO" comes out as...
|
by: Bill McCormick |
last post by:
Hello,
I'm new to VB.NET but have used regexp in Perl and VI.
I'd like to read a regular expression from a file and apply it to a
string read from another file. The regexp is simple word...
|
by: arno |
last post by:
Hi,
I want to search a substring within a string :
fonction (str, substr) {
if (str.search(substr) != -1) {
// do something
}
}
| |
by: runsun pan |
last post by:
Hi
I am wondering why I couldn't get what I want in the following 3 cases
of re:
(A)
var p=/(+-?+):(+)/g
p.exec("style='font-size:12'")
-- // expected
|
by: Markus Svilans |
last post by:
Hi,
I have a weird problem in a virtual method. The original method code
raises an access violation when it is run. The solution to the problem
is to declare a dummy integer inside the virtual...
|
by: yoni |
last post by:
Hi,
I am trying to write a regexp to find all the code on the header of
entities in SQL Server (views, SPs, etc...) I got something like this:
(.|\n)*((create view)|(create proc)|(create...
|
by: yoni |
last post by:
Hi,
I am trying to write a regexp to find all the code on the header of
entities in SQL Server (views, SPs, etc...) I got something like
this:
(.|\n)*((create view)|(create proc)|(create...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |