Code produces "sub" error: WHY?

P

Phil Powell

Code:
Dim brinksterAdRemoveRegexp
set brinksterAdRemoveRegexp = new RegExp
brinksterAdRemoveRegexp.Pattern =
"(<!-{2,}[\s\t]*BEGIN.+[\n\r\s\t]*END.+PLEASE REMOVE[\s\t]*-{2,}>)"
brinksterAdRemoveRegexp.Global = TRUE
brinksterAdRemoveRegexp.IgnoreCase = TRUE

brinksterAdRemoveRegexp.Replace(bandOriginDropdown, "")
brinksterAdRemoveRegexp.Replace(bandStyleTextField, "")
brinksterAdRemoveRegexp.Replace(bandDescriptionTextField, "")

Produces this error:

Microsoft VBScript compilation error '800a0414'

Cannot use parentheses when calling a Sub

/soa/soa_samp.asp, line 104

brinksterAdRemoveRegexp.Replace(bandOriginDropdown, "")

USAGE: Classic ASP, IIS 5.0

Can someone give me an idea what on earth I'm doing wrong? I'm simply
trying to remove some built-in HTML text that I receive whenever I do a
remote scrape to a particular site.

Thanx
Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top