procmail
[Top] [All Lists]

Re: A quick regex question

1998-02-24 13:27:22
On Tue, 24 Feb 1998, David W. Tamkin wrote:

= Tor Perkins,
= 
= | The FAQ says:
= | 
= |   The manual says the regexp engine is egrep compatible
= |     'Tain't so. This statement is probably a holdover from older times when
= |     basically it was, or tried to be.
= | 
= | I've boiled it down to this:  q{4,}   does not seem to work for me...
= 
= It doesn't work in many egreps either (though there are yet other ways in
= which procmail's regexp engine differs from egrep's).
= 
= | What this should match is four or more of the letter q in a row.  It can be
= | used in a recipe like this:
= | 
= | :0:
= | * q{4,}
= | my-folder
= | 
= | Is this not supported?  Is there a good work-around?
= 

Exim uses a package called pcre, 
(Perl Compatible Regular Expressions) which is a c library that implements
full perl extended regex's.  I don't know if this would cause an
unacceptable performance penalty for procmail.  Considering how often
this has come up on the list (twice in the month I've been on...) 
the time it costs in running more slowly may be made up by not having 
to deal with it on the list.

Comparisons show it to be a bit faster than Spencer's Regex library,
plus enhanced flexibility.



Sherwood Botsford       | email 
avatar(_at_)vega(_dot_)math(_dot_)ualberta(_dot_)ca
Sorcerers Apprentice    | Office CAB 642B
System Administrator    | Tel: 403 492 5728 
Trouble shooter         | Fax: 403 492 6826


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