Subject cleaner

=?Windows-1250?Q?Jernej_Simon=E8i=E8?= <[email protected]>
Newsgroups gmane.mail.the-bat.devel
Organization E-Mailaholics International
Message-ID <[email protected]>
Lately one of the lists I frequent started having hiccups, and occasionally
turning subjects into mess like this: "Re: [P] Re: [P] Re: [P] ...". The old
subject cleaner QT never really worked the way I wanted, so I wrote a new
one:

%SETPATTREGEXP=/^(?:(?:[^:]{0,4}(?:\[[\d]+\])?:)?\s*(\[[^\]]*\]\s)|(?:(?:[^:]{0,4}(?:\[[\d]+\])?:)?\s*(?:\[[^\]]*\]\s*)?)?)%-
\s*(?:(?:[^:]{0,4}(?:\[[\d]+\])?:)?\s*(?:\[[^\]]*\]\s*)?)*%-
(.*?)%-
([\(\[].+[\)\]])?$/%-
%RegExpBlindMatch="%OSubj"%-
%Subject='Re: %SUBPATT="1"%SUBPATT="2"'

I've tested it with a few random messages from different mailing lists, and
as far as I can see it works fine. The QT will remove all but the central
part of the subject, and the mailing list tag (if there was one). So the
mess from above would become "Re: [P] ...". Various stuff in brackets at the
end of subject is removed, too.

-- 
Jernej Simoncic, jernej.simoncic-zs/[email protected]
http://www2.arnes.si/~sopjsimo/
ICQ: 26266467

[The Bat! v3.0.2.10 on Windows NT Clone 5.2.3790.]

Anything that begins well ends badly. Anything that begins badly ends worse.
       -- Universal Law
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.