procmail
[Top] [All Lists]

what regexps work?

1997-04-09 13:58:00
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.

Is that first character class valid?

        * !^Subject:(.Re:|(.*[[({ -]([wW]as|Re):))

Can I use ^ or $ anchors inside parens?

        * ^From:.*@([^> ]*\.)?usa.net([^-a-z0-9.]|$)

Can I code this perl regexp in procmail?

        /^From:.*[ <]([^\(_at_)]+\@(\1|[^.]{13,})\.(com|net)([ >]|$)/i

(Ie, is {} understood and can I do backreferences?)

Would a procmail equivilent correctly match this:

        From: schMuck(_at_)SchmucK(_dot_)com

Ie, if procmail supports backreferences, does it do case insensivity
with them right?

Why can't procmail have a real (zero-width) word boundry operator? 
Does procmail know about [:alpha:] and company? How about [=n=]
and company? Does procmail use locale for [a-z] expansions? (Perl
does not.)

Elijah
------
please do not CC me when replying to the list

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