Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

procmail and regular expressions



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii

Many of the mailman based lists use [xxx] in the subject lines:
Subject: [iPAQ] a subject
or 
Subject: Re: [iPAQ] a subject

I have a rule and condition for both of these constructs:
	* ^Subject:.Re:.\[iPAQ\]
This matches the reply in the normal case. 

This works fine. Note that the left and right square brackets must be 
escaped.
The problem is when I get a subject such as:
Subject: Re: [Gpe] Re: [iPAQ] GPE - GNU PDA Environment


My condition for that should match is:
	* ^Subject:*\[iPAQ\]

Note that the leading asterisk is a flag to procmail, so the RE passed to 
egrep would be:
"^Subject:*\[iPAQ\]"

I have not tested this by manually running egrep, but it should work. 
What this ERE shoudl mean is:
The line starts with "Subject:" followed by 0 or more characters until the 
'[iPAQ]'.

It's got to be something so simple, what am I missing. I've been doing REs 
and EREs for 20 years.



- -- 
Jerry Feldman <gaf at blu.org>
Boston Linux and Unix user group
http://www.blu.org PGP key id:C5061EA9
PGP Key fingerprint:053C 73EC 3AC1 5C44 3E14 9245 FB00 3ED5 C506 1EA9


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Exmh version 2.5 12/25/2001

iD8DBQE8MdHz+wA+1cUGHqkRApNEAJ0UDmdVfBW8FJlkYc09DupoxnnGtwCeLbfb
12hYtyVUdnu/GAID5JhTQsk=
=4NEt
-----END PGP SIGNATURE-----





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org