mhonarc-users

Re: Question about subjectstripcode

2000-09-08 14:08:59
On September 7, 2000 at 20:15, "SysAdmin, dte.net" wrote:

I use subjectstripcode to strip the subject prefix my mailing lists adds
automatically, but lately I wanted to try stripping the subject prefix even
if it's preceded by 'Re:'. I thought this would do it, but it doesn't:

<SUBJECTSTRIPCODE>
s/^\IML://;
s/^\Re: IML://;
s/^\RE: IML://;
s/^\re: IML://;
$_ = 'No Subject' unless /\S/;
</SUBJECTSTRIPCODE>

Perhaps it all has to be in one line of Perl? My regex abilities are still

No.  It can be any number of lines.

Do not use "\" unless really needed.  For example, the sequence "\r"
actually refers the carriage return character.  Try something like
the following:

<SubjectStripCode>
s/^(?:re:\s+)?IML:\s*//i;
$_ = 'No Subject' unless /\S/;
</SubjectStripCode>

--ewh

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