procmail
[Top] [All Lists]

My brain hurts

1998-08-21 09:54:42

I wish I could get the hang of regexps.  They hurt my brain. :)

I have the following recipie:


:0 c
* ^From.*\.(mil|dod|gov)
* BH ?? ^[      ]*subscribe signet.*(\.(mil|dod|gov))
| ./approve

I don't want it to match on things like this:

subscribe signet person(_at_)mindspring(_dot_)com
subscribe signet "Hedley Robertson" <robertsh11(_at_)hotmail(_dot_)com>

But I do want it to match on thngs like this

subscribe signet "Hedley Robertson" 
robertsh(_at_)emh(_dot_)gordon(_dot_)army(_dot_)mil
subscribe signet "Hedley Robertson" 
<robertsh(_at_)emh(_dot_)gordon(_dot_)army(_dot_)mil>

Basically I want to filter out anything that doesn't end in a .mil, .dod,
or .gov.  

One problem I have with my recipie is that it will match
someperson(_at_)system(_dot_)government(_dot_)mil(_dot_)au since it matches a 
.mil.

Also, how to I check in procmail for the possible trailing > in the e-mail
address?  

Thanks,

Hedley


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