From 6c5896ef2f10281d953dd2cb9cb29282261e5e56 Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Wed, 5 Feb 2025 12:26:45 +0200 Subject: [PATCH] add multiline replace --- imap_filter/imap_filter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imap_filter/imap_filter.py b/imap_filter/imap_filter.py index fcd2521..a647639 100644 --- a/imap_filter/imap_filter.py +++ b/imap_filter/imap_filter.py @@ -222,7 +222,7 @@ class ImapFilter: search, match.group(0) ) - new_content = re.sub(search, replacement, content) + new_content = re.sub(search, replacement, content, falgs=re.MULTILINE) if content != new_content: self._log.debug( "Line is different, so replacing it with '%s'",