procmail
[Top] [All Lists]

Re: Suggestion for Enhancement; B, H, ... and D

2002-02-19 00:37:04
   While it is a pile of fun to invent an idiosyncratic irregular expression
syntax, imperfect human memory can make this painful afterwards. It would be
great to allow users a maximum of transferrable knowledge, when switching tools,
so I'm wary of fiddling with the ERE syntax.

   To gain per-condition case sensitivity, would it be completely silly to do
something like:

   :0: 
   D * ^From procmail-admin
   procmail_u

   (Would have liked "* D From procmail-admin", but who's to say, then, that
the D is not in the regex?) Consistent with the D flag, and providing
per-condition case sensitivity, it leaves the character by character stuff to
ERE. 

   In all my years of regexing, it has seemed sufficient to use regular
expression syntax for localised case sensitivity management. e.g.:

   [Aa]        # Available syntax for single character case insensitivity
   [A-Za-z]    # Available syntax for character class case insensitivity

   To have any chance of winning over the proponents of "funny regex",
procmail's missing {n,m} functionality would probably need to be added to the
limited * and +. i.e.:

   [A-Za-z]{3}    # Exactly 3 case insensitive characters
   [A-Za-z]{3,}   # 3 or more case insensitive characters
   [A-Za-z]{,4}   # Up to case insensitive characters
   [a-z]{3,7}     # 3 to 7 case sensitive characters

   Probably more than 'nuff said. Wouldn't mind a new flag to OR instead of AND,
though, to echo a previous poster. It could perhaps go in with the
per-condition case switch:

   * D O * ^frog[a-zA-Z]{3,7}      <- Case sensitive, OR, with insensitive part.


   Look! Clean EREs.  ;-)

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