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 mhtxtplain.pl 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 qrarc-txtplain.pl. You find them
at ftp://ftp.gunnar.cc/pub/gunnar/mhonarc/.
Please note that in my case the message footer is fixed.
> The comment tags are removed by mhonarc, but the content is left
> behind.
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