I have the Roundcube Webmail v. 1.3.1 mail client with managesieve v. 8.7 extension and want to add some regex driven actions for my mail and the only documentation I found on the regex flavour is this document. However I can't find which special characters it supports like \n (or is it \\n?), \r or \d etc. and how to write them. There is a mention of character groups defined through [: :] which works however I would rather use \n (which does not seem to be working) instead of broader [:cntrl:] or [:space:] or such.

In the document there is written that it has to support POSIX ERE standard however I am familiar with different flavours of regexes (PERL type) so I find that rather difficult.

Can you help with finding out which special characters and character sequences are supported in that? Which characters are not special etc.?

I came up with a simple regex to match a date in YYYY/MM/DD then space then time in HH:MM:SS format then line break and then whatever at the start of a body of a mail but it does not seem to be working. Here is the Sieve code:

require ["body","fileinto","regex","vacation"];
# rule:[date and time]
if anyof (body :text :regex "[[:digit:]]{2}/[[:digit:]]{2}/[[:digit:]]{4} [[:digit:]]{2}:[[:digit:]]{2}:[[:digit:]]{2}[[:space:]](.*[[:space:]]*)*")
vacation text:

The Sieve documentation that you linked to specifies that it conforms to POSIX Regular Expression Syntax, which is documented at


This would be the most definitive reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.