I have the following code
<%
txt = ""+(rs_email.Fields.Item("g_email_body").Value)+""
Set objReg = CreateObject("vbscript.regexp")
objReg.Pattern = "[activate]"
activate = (objReg.Replace(txt,"http://www.gamtool.com/activate.asp?id="+(Recordset1.Fields.Item("g_userbase_id").Value)+""))
%>
When I run the code I get an error on the last line
activate = (objReg.Replace(txt,"http://www.gamtool.com/activate.asp?id="+(Recordset1.Fields.Item("g_userbase_id").Value)+""))
%>
any ideas why I am getting the error?
I have updated the code above to the following:
<%
Set regEx = New RegExp
regEx.Global = true
regEx.IgnoreCase = True
regEx.Pattern = "\[activate\]"
strText = ""+(rs_email.Fields.Item("g_email_body").Value)+""
activate = regEx.Replace(strText, ""+(Recordset1.Fields.Item("g_userbase_id").Value)+"")
%>
If I change the ""+(Recordset1.Fields.Item("g_userbase_id").Value)+"") to any value but insert the value static then it works.
Thanks
value = Recordset1.Fields.Item("g_userbase_id").Value2)url = "http://www.gamtool.com/activate.asp?id=" + (value) + ""3)activate = (objReg.Replace(txt, url))On which of these lines does the error occur?