From 92351a02ec75ed8ac335937d9cb9ac14c550949e Mon Sep 17 00:00:00 2001 From: Maple Nebel Date: Wed, 1 Jul 2026 19:16:45 +0200 Subject: [PATCH] fix regex --- src/error_codes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error_codes.rs b/src/error_codes.rs index 95125a0..1b3aac4 100644 --- a/src/error_codes.rs +++ b/src/error_codes.rs @@ -56,7 +56,7 @@ impl Default for ErrorInfo { } static ERROR_CODE_REGEX: Lazy = - Lazy::new(|| Regex::new(" \\d\\d\\d-\\d\\d\\d\\d ").expect("invalid regex")); + Lazy::new(|| Regex::new("(?<=(^| ))\\d\\d\\d-\\d\\d\\d\\d(?=($| ))").expect("invalid regex")); pub struct ErrorCodeHandler;