procmail
[Top] [All Lists]

Re: what regexps work?

1997-04-11 23:43:00
Philip Guenther <guenther(_at_)gac(_dot_)edu> wrote:
process(_at_)qz(_dot_)little-neck(_dot_)ny(_dot_)us (Eli the Bearded) writes:
procmailrc(5) states that procmail has a fully compatible regexp
engine with egrep. What egrep? There are many versions. Here are
some regexp problems I have that I want to work in procmail.

The _original_ egrep: extended, but not bloated, regexps.  In newer
procmail versions the procmailrc(5) manpage describes what procmail's
regexps support.

Actually, it supports a superset of the POSIX egrep, except for the named
classes.  By default, if the documentation mentions another program, think
POSIX first.

Why can't procmail have a real (zero-width) word boundry operator? 

Because that would slow down the lean-mean-regexp-machine by an order
of magnitude.  The implementation doesn't lend itself to zero-width
operators.  It would require substantial rewriting together with
a considerable performance loss.
The current regexp engine *never* goes backward in the stream of
characters, and it *never* looks ahead in the stream.  It simply advances
by one character every time and makes decisions based on its value.
-- 
Sincerely,                                                          
srb(_at_)cuci(_dot_)nl
           Stephen R. van den Berg (AKA BuGless).

A sign seen at the local pizza place: "DO NOT CARRY TAKE-OUT BOXES BY HANDLES"

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