As per the latest Sieve BOF, I have just sent in an update to the regex
extension:
http://www.oceana.com/ftp/drafts/draft-murchison-sieve-regex-07.txt
ftp://ftp.oceana.com/pub/drafts/draft-murchison-sieve-regex-07.txt
The major outstanding issues are what to do (if anything) about il8n,
and should we allow the use of additional regex expressions, such as
backreferences and/or variables.
Both of the last two items work with grouped parts of the regex but have
a very subtle difference; the former is used within the regex and the
latter is used outside of the regex. Backreferences would probably be
more useful with a body test (e.g. for matching HTML tags, etc) than
with header or address/envelope test. Here are examples (quite possibly
cooked) of both:
# Backreferences example - Discard any subjects with double words
if header :regex "subject" "([A-Za-z]+) +\\1" {
discard;
}
# Variables example - File IETF WG mail
if envelope :regex "from" "ietf-(.+)@imc.org" {
fileinto "INBOX.ietf.$1;
}
--
Kenneth Murchison Oceana Matrix Ltd.
Software Engineer 21 Princeton Place
716-662-8973 x26 Orchard Park, NY 14127
--PGP Public Key-- http://www.oceana.com/~ken/ksm.pgp