From 847f9c3705b989d64bee3cc873999d5d6b322ed1 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 21 Mar 2024 13:13:27 +0100 Subject: [PATCH] fix Signed-off-by: Harald Hoyer --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index c0e9024..3f2f6f0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,7 +30,8 @@ impl Replacer for MailScrambler { } fn main() { - let re = Regex::new(r#"["]([^"\f]*@[^"\s]*)["]"#).unwrap(); + let re = + Regex::new(r#""([[[:ascii:]]&&[^"\f\[\]\\]]*?@[[[:nfpvv:]]&&[^"\s]\[\]\\]*)""#).unwrap(); let mut line = String::new();