Re: Bug in the subject way.. confusing Re:

From: Tom von Alten <alien_at_hpdmlad.boi.hp.com_at_hypermail-project.org>
Date: Tue, 4 Jan 2000 16:07:04 -0700 (MST)
Message-Id: <200001042307.QAA15183_at_hpdmlad.boi.hp.com>


Jose wrote:
> ...I think we have a too persuasive Re: search filter. The fix
> seems to be easy enough (if the first char isn't Re:, stop searching?).

I worked on this issue quite a bit with a wrapper script we used with our local v1.02+ hypermail code.

In perlish terseness, what I wanted was to pipe the subject through:

  perl -pe 's/^(re(\[\d*\])*:\s*|betr\.:(\[\d*\])*:\s*)*//i'

to strip prefixes and leave just the meaningful subject. This attacks only *prefixes*, of course. "Re:" imbedded further on in the subject is properly left alone.

This code adds "Betr." as an enumerated prefix to be stripped, for lists that have people with mailers configured for German. Maybe you don't care about that, but putting "FW" in there along with "RE", for example, might be appealing.

This also attacks the (becoming less common) habit of some mailers to insert a number in [] for subsequent replies, i.e., "Re[2]: xyz" as well as the (even less common these days) mailers that are happy to prepend multiple "Re:"s.

In the current discussion, one would want to prepend "Re: " (or maybe "RE: ") after all potentially unpleasant combinations were stripped.

Somewhere, there are persons who know C and perl both so well that they could just whip out some C to do what that snippet of perl does. (You think?)

I know it's not me!



Tom von Alten

This posting is for informational purposes only and is provided with no warranty of any kind. It is not a statement of the Hewlett-Packard Co. Received on Wed 05 Jan 2000 01:11:20 AM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:52 PM GMT GMT