[Top] [All Lists]


2003-11-18 09:52:50

As per the latest Sieve BOF, I have just sent in an update to the regex extension:

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" {

# Variables example - File IETF WG mail
if envelope :regex "from" "ietf-(.+)" {
  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--

<Prev in Thread] Current Thread [Next in Thread>
  • draft-murchison-sieve-regex-07.txt, Ken Murchison <=