Subject: Striping Parts of Subject line?

From: Ryan Bradford Neily <[email-masked]>
Date: Tue, 28 Jan 1997 09:04:24 -0500

Is there any way to apply a filter to strip parts of a subject line?  I
want to take off the numbering sequence in mailing list to allow for
proper threading.  

Is there any way to to this out side of pine?  Maybe via procmail?

The string I wish to strip off is: "[List:23432]".  Can this be done?

Ryan Bradford Neily                                   Phone: 912-764-5522
Georgia Southern University                        Data/Fax: 912-764-???? 
Internet E-mail: [email-masked]                   Member Team Os/2!
=-> Visit the GSU Computer Science Home Page: http://www.cs.gasou.edu! <-=

---

From: "Robin S. Socha" <[email-masked]>
Date: Tue, 28 Jan 1997 16:22:13 +0100 (CET)

>Is there any way to to this out side of pine?  Maybe via procmail?
							    ^^^^^^^^
Good example, there's some more filtering software available, but procmail
is pretty neat. Check Nancy McGoughs Filtering FAQ at:
FAQ-launcher-URLs: http://www.jazzie.com/ii/faqs/archive/mail/filtering-faq/
                   http://www.best.com/~ii/faqs/archive/mail/filtering-faq/

  >The string I wish to strip off is: "[List:23432]".  Can this be done?

Sure.

Cheers,
Robin

++---+---+---+---+---+---+---+---++---+---+---+---+---++---+---+---+---+---++
   Robin S. Socha	 Political Science Dept.	Tel: +49(0228)22217-8
   Bonner Talweg 56	 Bonn University		Fax: +49(0228)22217-9
   53113 Bonn		 email: [email-masked]
++---+---+---+---+---+---+---+---++---+---+---+---+---++---+---+---+---+---++
       On the package it said: "Requires MS Windows 3.11 or better"  
	       			      ...  so I got myself Linux. 
++---+---+---+---+---+---+---+---++---+---+---+---+---++---+---+---+---+---++

---

From: [email-masked] (Sven Guckes)
Date: 29 Jan 1997 05:47:41 GMT

[email-masked] (Ryan Bradford Neily):
> Is there any way to apply a filter to strip parts of a subject line?

Yes, procmail is a good filter to do these things.
Use "formail" in a procmail recipe for this.

> I want to take off the numbering sequence in mailing list to allow for
> proper threading.  

Proper threading is done with the info given in the References line -
not the Subject (although this may help, too).

> The string I wish to strip off is: "[List:23432]".  Can this be done?

Yes, - should be.  :-)

Using Vi notation I assume it looks like this:

	:0: fhw
	* ^Subject: \(.*\)\[List:[0-9]*\]\(.*\)
	| formail -I Subject: \1\2

Note:  Untested!  Please verify by reading "man procmailrc"!

Sven