procmail
[Top] [All Lists]

Re: Range matching

2000-11-09 08:31:22

Example
I want to match the following;
Subject:  Report 677   or  
Subject: Report 65      but not
Subject: Report 1       or
Subject: Report 3212

My expression here would be.... *Subject:.Report.[0-9]\{2,3\}

I.e. I want to match where the Subject starts with "Report" followed by
either 2 or 3 digits.  The above expression does not match the examples
provided although it should.

What am I doing wrong?

 procmail does not understand perlish regular expressions. Your procmail
 condition line would be

  * ^Subject:[  ]*Report[       ]*[0-9][0-9][0-9]?

 The square brackets contain a space and a tab each. Maybe the first [0-9]
 could even be tightened to [1-9].

 [It should be possible to write an interface for Phil Hazel's pcre
  library (www.pcre.org), though, but I don't think I have the time :)]

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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