From 418d68de4934af99e39baa0fe0f2ddad3cc5a04c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 25 Aug 2024 12:54:06 +0200 Subject: [PATCH] Allow any non-space characters as quoted user name --- src/services/telegram/commands/diario.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/telegram/commands/diario.rs b/src/services/telegram/commands/diario.rs index e0228599..10e88585 100644 --- a/src/services/telegram/commands/diario.rs +++ b/src/services/telegram/commands/diario.rs @@ -27,7 +27,7 @@ impl FromStr for DiarioArgs { type Err = anyhow::Error; fn from_str(s: &str) -> Result { - static REGEX: Lazy = Lazy::new(|| Regex::new(r#" *(?:\[(?.+)])? *"(?.+)"[, ]*(?:[-–—]+(?\w+)(?:, *(?.+))?)?"#).unwrap()); + static REGEX: Lazy = Lazy::new(|| Regex::new(r#" *(?:\[(?.+)])? *"(?.+)"[, ]*(?:[-–—]+(?[^\n,]+)(?:, *(?.+))?)?"#).unwrap()); let captures = REGEX.captures(s);