{"record":{"id":"f1143f7ba6130dd4","repo":"tracel-ai/burn","slug":"invalid-regex-pattern-f1143f","errorCode":null,"errorMessage":"Invalid regex pattern","messagePattern":"Invalid regex pattern","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-store/src/filter.rs","lineNumber":72,"sourceCode":"        Self {\n            match_all: true,\n            ..Default::default()\n        }\n    }\n\n    /// Create a filter that matches nothing\n    pub fn none() -> Self {\n        Self::default()\n    }\n\n    /// Add a regex pattern for matching paths\n    ///\n    /// # Panics\n    ///\n    /// Panics if `pattern` is not a valid regular expression.\n    #[cfg(feature = \"std\")]\n    pub fn with_regex<S: AsRef<str>>(mut self, pattern: S) -> Self {\n        let regex = Regex::new(pattern.as_ref()).expect(\"Invalid regex pattern\");\n        self.regex_patterns.push(regex);\n        self\n    }\n\n    /// Add multiple regex patterns\n    ///\n    /// # Panics\n    ///\n    /// Panics if any pattern is not a valid regular expression.\n    #[cfg(feature = \"std\")]\n    pub fn with_regexes<I, S>(mut self, patterns: I) -> Self\n    where\n        I: IntoIterator<Item = S>,\n        S: AsRef<str>,\n    {\n        for pattern in patterns {\n            let regex = Regex::new(pattern.as_ref()).expect(\"Invalid regex pattern\");\n            self.regex_patterns.push(regex);","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-store/src/filter.rs#L54-L90","documentation":"Generic sentinel panic from with_regex: the regex crate rejected the user-supplied pattern string, so this fires for any invalid regular expression syntax (unbalanced parens, bad repetition, invalid escapes, etc.) rather than one specific fault. The input at fault is the pattern argument passed to with_regex. The function's doc already notes it panics on invalid regex.","triggerScenarios":"Thrown at crates/burn-store/src/filter.rs:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the pattern with `Regex::new` before calling with_regex","Fix unbalanced groups/brackets or bad escapes in the pattern","Use a fallible API on KeyRemapper/Filter if runtime validation is preferred"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}