Anyone have the pattern to remove Brinkster ads?

P

Phil Powell

URL: http://www3.brinskter.com/soa/soa_samp.asp?refURL=valsignalandet

This URL produces a nice page with form material to produce
user-inputted band search information

Problem is that Brinkster interferes with the HTML resultset by
embedding their annoying ads all over the place.

How on earth do I remove them??

Here is the code that I used that I thought would work:

Code:
Dim brinksterAdRemoveRegexp
set brinksterAdRemoveRegexp = new RegExp
brinksterAdRemoveRegexp.Pattern = "<!-- BEGIN text generated by
server\. PLEASE REMOVE -->.+<!-- END text generated by server\. PLEASE
REMOVE -->"
brinksterAdRemoveRegexp.Global = TRUE

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

Unfortunately it fails and I can't get it right. If nobody is able or
willing to give me the pattern, where is there a good RegExp building
tool out there, free, that I can obtain to do it for me? I can't
install The Regulator, requires .NET Framework, can't get it, I tried
all day, gave up.

Thanx
Phil
 
B

Bob Lehmann

How on earth do I remove them??
Wouldn't that violate the TOS you agreed to when you signed up for the
account?

Bob Lehmann
 
P

Phil Powell

Not necessarily, since the ads already appear, I just have no need to
have them appear multiple times on the same page since I'm doing
dynamic component insertions from the same server.

Phil
 
C

Chris Hohmann

Phil Powell said:
URL: http://www3.brinskter.com/soa/soa_samp.asp?refURL=valsignalandet

This URL produces a nice page with form material to produce
user-inputted band search information

Problem is that Brinkster interferes with the HTML resultset by
embedding their annoying ads all over the place.

How on earth do I remove them??

Here is the code that I used that I thought would work:

Code:
Dim brinksterAdRemoveRegexp
set brinksterAdRemoveRegexp = new RegExp
brinksterAdRemoveRegexp.Pattern = "<!-- BEGIN text generated by
server\. PLEASE REMOVE -->.+<!-- END text generated by server\. PLEASE
REMOVE -->"
brinksterAdRemoveRegexp.Global = TRUE

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

Unfortunately it fails and I can't get it right. If nobody is able or
willing to give me the pattern, where is there a good RegExp building
tool out there, free, that I can obtain to do it for me? I can't
install The Regulator, requires .NET Framework, can't get it, I tried
all day, gave up.

Thanx
Phil

Is there more than one (1) BEGIN/END comment set in the text you are
parsing? If so, you'll need to use non-greedy matching. Also, if there's a
possibility that there is no content between the BEGIN and END comments,
then you should use the "zero or more" quantifier. Here's what the revised
regular expression would look like:

<!-- BEGIN text generated by server\. PLEASE REMOVE -->.*?<!-- END text
generated by server\. PLEASE REMOVE -->

In addition, you may want to consider setting the IgnoreCase property for
the RegExp object to True.

In the future, if you could provide some more detailed information on how
something is "failing", it would facilitate the process of trying to resolve
your issues. Things like errors messages or expected output versus actual
output.

HTH-
Chris Hohmann
 

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,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top