procmail
[Top] [All Lists]

Re: Embedded comments

2003-05-26 16:27:25

On 26 May 2003 at 11:08, Daryle A. Tilroe wrote:

R A Chatwin wrote:
The matching snippet is: 
    ${a}<(!-- ?)?${w}${w}+( *--)?>$a
where the PERL-style variables are (inherited from JARI AALTO :-)
http://info.ccone.at/INFO/Tips+Co/pm-tips.html
    a       = "[a-zA-Z]"            # word, only letters
    w       = "[0-9a-z_A-Z]"        # word

What would the drawback be of simply using?:

      [a-zA-Z]<.*>[a-zA-Z]

I.E. why all the fancy stuff in the middle if one is just trying
to catch/weight comments not surrounded by white space?


Why? To keep up with the payments on my daughter's new car ;-)

Our business is technical translations & copy editing...
Incoming unknown mail (copy and pasted technical stuff):
"... p<0.05 for a>b, and ... [lots more of the same]"
Oops! A match. Gotcha! 

More important is the general idea of keeping the matches for bad
guys very specific. A false positive (good guy goes to jail) is a 
*bug*. A false negative (bad guy gets through) is just an annoyance. 
The specific matches can always be gently generalized if false 
negatives start to occur. The other way round is not really an option.

A case in point happened with an Autoreply to my earlier post
from a procmail list subscriber who, of course, will be Ann O'Nymus:

On 26 May 2003 at 4:55, O'Nymus, Ann wrote:

I will be out of the office until Tuesday,May 27th.

I really don't wish to know that. 'Ann' needs a more specific recipe 
not to autoreply to mailing list posters who don't know Ann from Adam.

Robert



--  
R A Chatwin (Badajoz, Spain). Please do not reply OFF LIST as well.  
Personal mail is welcome at: procm at chatwin.f2o.org (R A Chatwin)
http://chatwin.f2o.org  - - - - - - - - - - - - "Future Compatible"             
              

_______________________________________________
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>