procmail
[Top] [All Lists]

Re: backreferences for repeated characters?

2001-10-09 21:52:07
Paul Chvostek <paul(_at_)it(_dot_)ca> writes:

I'm trying to add a recipe to my spamtrap with what I think should be:

      * ^Subject: .*([^!])\1\1\1\1\1[^\1]+$

but it never seems to match, though the lines are correctly matched by
FreeBSD's egrep.

Back references are not part of the POSIX egrep specification or
'traditional' egrep behavior.  However, GNU grep (which is used by
FreeBSD) supports them not just with grep but also egrep.


Is backreferencing supported by procmail's internal egrep?  Is there
some other way I should be doing this?

Procmail does not support back references.  Whether there's another way
to do what you want depends on how closely the above regexp expressed
what you want.  Did you really want it to apply to any character but
'!', or would it be fine to only apply it to a handful of punctuation?


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