scripter73
Programmer
Hi,
I need help replacing my double quotes of my log file with single quotes. I've heard there's two ways to do this: 1) By using the RegExp Object, and 2) simply using the Replace() function.
I haven't had any luck using the RegExp object, because I can't create a new instance of the object.
Can someone check out my code and advise.
<html><head><title></title></head>
<body>
<%
Dim str ' some string that needs to have certain words
' replaced with other words
str="10.11.130.80 - - [01/May/2001:13:52:59 -0600] "GET /insuredacct/index.cfm HTTP/1.0" 200 355 "
Dim objRegExp
Set objRegExp = New RegExp
objRegExp.IgnoreCase = True
objRegExp.Global = True
'Replace all instances of Apache with IIS
objRegExp.Pattern = "\bApache\b"
str = objRegExp.Replace(str, "IIS"
'Repalce all instances of Perl with ASP
objRegExp.Pattern = "\bPerl\b"
str = objRegExp.Replace(str, "ASP"
Set objRegExp = Nothing 'Clean up!
response.write str
%>
</body>
</html>
I just want a ' every where there's a ".
Thanks in advance,
scripter73
I need help replacing my double quotes of my log file with single quotes. I've heard there's two ways to do this: 1) By using the RegExp Object, and 2) simply using the Replace() function.
I haven't had any luck using the RegExp object, because I can't create a new instance of the object.
Can someone check out my code and advise.
<html><head><title></title></head>
<body>
<%
Dim str ' some string that needs to have certain words
' replaced with other words
str="10.11.130.80 - - [01/May/2001:13:52:59 -0600] "GET /insuredacct/index.cfm HTTP/1.0" 200 355 "
Dim objRegExp
Set objRegExp = New RegExp
objRegExp.IgnoreCase = True
objRegExp.Global = True
'Replace all instances of Apache with IIS
objRegExp.Pattern = "\bApache\b"
str = objRegExp.Replace(str, "IIS"
'Repalce all instances of Perl with ASP
objRegExp.Pattern = "\bPerl\b"
str = objRegExp.Replace(str, "ASP"
Set objRegExp = Nothing 'Clean up!
response.write str
%>
</body>
</html>
I just want a ' every where there's a ".
Thanks in advance,
scripter73