Roundcube Community Forum

Third Party Contributions => API Based Plugins => Topic started by: markusj on August 02, 2024, 03:53:53 AM

Title: managesieve regex escaping question
Post by: markusj on August 02, 2024, 03:53:53 AM
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