| |
rahul27
Posts: 19
Score: 0
Joined: 5/23/2001
From: India
Status: offline
|
Hi, Would anybody know why I can't create an instance of an object utilizing the New operator? My ASP engine runs standard ASP code okay, but when I add the New keyword, it complains about the syntax. This is the weirdest thing. I've checked the syntax in books and on sites. Following is some code that I copied straight from a website just to test. <html><head><title></title></head> <body> <% Dim str ' some string that needs to have certain words ' replaced with other words str = "Apache Rules" Dim objRegExp Set objRegExp = New RegExp SYNTAX COMPLAINT 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>
|
|