need procmail expression help

Dave Lovelace dave at firstcomp.biz
Fri Nov 7 17:13:12 CET 2003


Eric Wood wrote:
> 
> I'd ask this on the procmail mail list but I can't seem to subscribe to it..
> they may be down.
> 
> I have this rule:
> * ^Subject:.*[ ][ ][ ][ ][ ][ ]+
> 
> which will test of there is a least 6 consecutive spaces in the subject
> line.  However, I don't care if the subject line has trailing spaces.  How
> can I trim off the trailing spaces so that I only care about leading spaces
> and whatever spaces are in between the words?
> 
> -eric wood
> 
> 
* ^Subject:.*[ ][ ][ ][ ][ ][ ]+[^ ]
should do it.  This requires at least 6 blanks followed by a non-blank
character.  (These are just egrep regular expressions, with some special
stuff on top of it.)

(In fact, why do you need all those brackets?  Does procmail collapse
whitespace in regexps?)

-- 
- Dave Lovelace
  dave at firstcomp.biz
  davel at cyberspace.org




More information about the Bogofilter mailing list