Reputation: 627
Okay, this is the problem:
I am getting this error message when I am trying to run the following script
Dim rg
Dim match
Set rg = New RegExp
rg.Pattern = "Mod Read Access"
rg.Global = True
roles = Session("Roles")
Set match = rg.Test(roles)
it chokes at the rg.Test(roles) point.
I suspect that I may be doing something wrong since I don't normally program in asp classic. What exactly am I doing wrong?
Upvotes: 1
Views: 2241
Reputation: 2327
Instead of:
Set match = rg.Test(roles)
try:
match = rg.Test(roles)
Set is used for object assignment. The Test method returns a Boolean not an object, hence calling it with Set fails (runtime error 800a01a8 is "Object required").
Upvotes: 7
Reputation: 4024
The RegularExpressionObject could not be found, that is the error code your receive. Also regular expressions with cscript of vbscript will result in memory leaks.
Upvotes: 0