{"id":"b14cd637624f9390","repo":"BurntSushi/ripgrep","slug":"err-consider-enabling-multiline-mode-with-the","errorCode":null,"errorMessage":"{err}\n\nConsider enabling multiline mode with the --multiline flag (or -U for short).\nWhen multiline mode is enabled, new line characters can be matched.\n\nConsider enabling text mode with the --text flag (or -a for short). Otherwise,\nbinary detection is enabled and matching a NUL byte is impossible.","messagePattern":"(.+?)\n\nConsider enabling multiline mode with the --multiline flag \\(or -U for short\\)\\.\nWhen multiline mode is enabled, new line characters can be matched\\.\n\nConsider enabling text mode with the --text flag \\(or -a for short\\)\\. Otherwise,\nbinary detection is enabled and matching a NUL byte is impossible\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/core/flags/hiargs.rs","lineNumber":521,"sourceCode":"            // be allowed to match NUL bytes explicitly, which this would\n            // otherwise forbid.\n            if self.null_data {\n                builder.line_terminator(Some(b'\\x00'));\n            }\n        }\n        if let Some(limit) = self.regex_size_limit {\n            builder.size_limit(limit);\n        }\n        if let Some(limit) = self.dfa_size_limit {\n            builder.dfa_size_limit(limit);\n        }\n        if !self.binary.is_none() {\n            builder.ban_byte(Some(b'\\x00'));\n        }\n        let m = match builder.build_many(&self.patterns.patterns) {\n            Ok(m) => m,\n            Err(err) => {\n                anyhow::bail!(suggest_text(suggest_multiline(err.to_string())))\n            }\n        };\n        Ok(PatternMatcher::RustRegex(m))\n    }\n\n    /// Returns true if some non-zero number of matches is believed to be\n    /// possible.\n    ///\n    /// When this returns false, it is impossible for ripgrep to ever report\n    /// a match.\n    pub(crate) fn matches_possible(&self) -> bool {\n        if self.patterns.patterns.is_empty() && !self.invert_match {\n            return false;\n        }\n        if self.max_count == Some(0) {\n            return false;\n        }\n        true","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/BurntSushi/ripgrep/blob/3fce3b5bb0236da2df6d99672afb8a719642eca7/crates/core/flags/hiargs.rs#L503-L539","documentation":"Error \"{err}\n\nConsider enabling multiline mode with the --multiline flag (or -U for short).\nWhen multiline mode is enabled, new line characters can be matched.\n\nConsider enabling text mode with the --text flag (or -a for short). Otherwise,\nbinary detection is enabled and matching a NUL byte is impossible.\" thrown in BurntSushi/ripgrep.","triggerScenarios":"Thrown at crates/core/flags/hiargs.rs:521 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable multiline mode with --multiline (-U) to match newline characters","Use --text (-a) to disable binary detection so NUL bytes can be matched"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"3fce3b5bb0236da2df6d99672afb8a719642eca7","analyzedAt":"2026-08-06T01:39:05.073Z","schemaVersion":2}