Subject: Truncating Subject: field

From: [email-masked] (Dan Adrian Nutu ( dannutu ))
Date: Wed, 15 Mar 1995 22:36:50 -0500 (EST)

Is there no way to extract a single word from the Subject:
field and then to redefine Subject: as the remainder?
(from within .procmail!!!)

I want to find out the first word of the Subject: field,
redefine Subject: as initial Subject: MINUS the first
word (that is, truncate it after the first word), and
then run a program (flist) with the *modified* mail at
his stdin if the extracted first word is equal to a
constant string.

I need this *VERY MUCH* && I would appreciate any help/ideas.

Thanks a lot.

-- 
cul8r,
Dan,

Always looking for girls with the HHP, UUP or NFDM syndrome(s)! :) :) :)
==============================================================================
Signatures usually are [funny|stupid] lines added to the end of letters.
This is a 'smart' remark, therefore it is *not* a signature! :)
Anyway - .big .sig available on request! :)
==============================================================================

---

From: [email-masked] (David W. Tamkin)
Date: Wed, 15 Mar 1995 23:01:41 -0600 (CST)

Dan Nutu asked,

| Is there no way to extract a single word from the Subject:
| field and then to redefine Subject: as the remainder?

There is a way, and with version 3.10 it's fairly easy.

| I want to find out the first word of the Subject: field,
| redefine Subject: as initial Subject: MINUS the first
| word (that is, truncate it after the first word), and
| then run a program (flist) with the *modified* mail at
| his stdin if the extracted first word is equal to a
| constant string.

That's tricky to parse; I'm going to assume that Dan meant this:

| I want to find out the first word of the Subject: field,
| and if the extracted first word is equal to a certain string
| to redefine Subject: as initial Subject: MINUS the first
| word (that is, truncate it after the first word), and
| then run a program (flist) with the *modified* mail as stdin.

 :0
 * ^Subject: *magicword\>.*\/[^ ].*
 | formail -I"Subject: $MATCH" | flist whatever_other_args