![]()
From: Tom von Alten (alien@hpdmlad.boi.hp.com)
Date: Tue Jan 04 2000 - 17:07:04 CST
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.
![]()