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

Reply via email to