Re: stripping body ads

2000-03-10 20:54:36
Wade VanBuskirk wrote:

I would like to strip out the ads which this list has added to the
message body.

Hi Wade,

I let MHonArc strip a message footer when archiving a mailing list.
Normally MHonArc uses to filter plain text, but by using
the <MIMEFilters> resource I make it use a modified text/plain filter
instead, in which I have added some strip code. Please feel free to
study my solution in qrmailarc.rc and You find them

Please note that in my case the message footer is fixed.

The comment tags are removed by mhonarc, but the content is left

This surprises me; are you sure that they are not included in the HTML
source? If they are, you could try something like this:

    $data =~ s/<!--\sbegin[\S\s]*?-->[\S\s]*?<!--\send[\S\s]*?-->//g;

Or else you could try this:

    $data =~ s/-{27}[\S\s]+?-{28}[\S\s]*?-{72}//g;

/ Gunnar

<Prev in Thread] Current Thread [Next in Thread>