[prev in list] [next in list] [prev in thread] [next in thread] 

List:       procmail
Subject:    searching subject and body
From:       dattier () wwa ! com (David W !  Tamkin)
Date:       1998-03-31 20:02:11
[Download RAW message or body]

Jari Aalto suggested to Chuan Wang,

|     :0
|     * H ?? Subject:.*remove
|     * B ?? \<remove\>
|     { .. do it ... }

Accepting it in the subject is a good idea, but Jari's code requires that
both the subject and the body contain the word.  The two need to be ORed, not
ANDed.  Since the search areas are different, simple ORing with a pipe symbol
doesn't work here.

In addition to the standard ways of coding OR, here's a special one for
searching the subject and the body for a given word in either:

  :0 flags
  * HB ?? ^^(.+$)*(Subject:(.*[^a-z0-9])?|$(.*\<)*)remove\>
  action

If the string doesn't have to be preceded by a word border, it gets a little
simpler:

  * HB ?? ^^(.+$)*(Subject:.*|$(.|$)*string

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic