procmail
[Top] [All Lists]

Re: Matching an empty field?

1997-08-19 11:02:26
Ken Hooper asked,

| Shooting at:
| 
|       ""
|       "No Subject"
|       "Unidentified Subject!"
|       "This Subject Line is Not Really Here"
| 
| and suchlike.

Thanks for explaining.  You realize that it would also catch this thread!
Anyhow, my previous suggestion should do it:

| >  * ^Subject:((.*\<)?subject\>|[     ]*$)

| Thank you.

De nada.

| Would [^.+]$ match the "nothing here at all" case?

No; [^.+]$ would match any single character except newline, period, or plus
(period and plus are not magic inside brackets) next to the end of the line.

In my suggestion above, (.*\<)? might be reducible to .* because there aren't
any longer words I can think of that end in "subject"; on the other hand, you
would want \> after it so as not to catch on the word "subjective" (unless
the word "subject" also appears in the subject).

You might make this modification if you want to treat "subjects" the same as
the singular:

     * ^Subject:((.*\<)?subjects?\>|[   ]*$)

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