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;