Roundcube Community Forum

 

managesieve regex escaping question

Started by markusj, August 02, 2024, 03:53:53 AM

Previous topic - Next topic

markusj

Hi there,

i'm wondering how to create a regex filter. I.e. if I want to filter by a simple regular expression like '.*\d$', and add it to a rule using type "regex", the following sieve rule is created:

[...]body :text :regex ".*\\d$")

So the backslash is escaped, and the meaning of the rule changed. I wanted to filter any text that ends with a digit, now I'm filtering anything that ends with backslash + 'd'.

Can someone help to create a real regex filter?

Thanks in advance.

Markus