{"id":"1b7366ac89fbcb77","repo":"BurntSushi/ripgrep","slug":"pcre2-is-not-available-in-this-build-of-ripgrep","errorCode":null,"errorMessage":"PCRE2 is not available in this build of ripgrep","messagePattern":"PCRE2 is not available in this build of ripgrep","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/core/flags/hiargs.rs","lineNumber":462,"sourceCode":"                    // should be big enough for anything. But let's crank it to\n                    // 10MB.\n                    .max_jit_stack_size(Some(10 * (1 << 20)));\n            }\n            if !self.no_unicode {\n                builder.utf(true).ucp(true);\n            }\n            if self.multiline {\n                builder.dotall(self.multiline_dotall);\n            }\n            if self.crlf {\n                builder.crlf(true);\n            }\n            let m = builder.build_many(&self.patterns.patterns)?;\n            Ok(PatternMatcher::PCRE2(m))\n        }\n        #[cfg(not(feature = \"pcre2\"))]\n        {\n            Err(anyhow::anyhow!(\n                \"PCRE2 is not available in this build of ripgrep\"\n            ))\n        }\n    }\n\n    /// Build a matcher using Rust's regex engine.\n    ///\n    /// If there was a problem building the matcher (such as a regex syntax\n    /// error), then an error is returned.\n    fn matcher_rust(&self) -> anyhow::Result<PatternMatcher> {\n        let mut builder = grep::regex::RegexMatcherBuilder::new();\n        builder\n            .multi_line(true)\n            .unicode(!self.no_unicode)\n            .octal(false)\n            .fixed_strings(self.fixed_strings);\n        match self.case {\n            CaseMode::Sensitive => builder.case_insensitive(false),","sourceCodeStart":444,"sourceCodeEnd":480,"githubUrl":"https://github.com/BurntSushi/ripgrep/blob/3fce3b5bb0236da2df6d99672afb8a719642eca7/crates/core/flags/hiargs.rs#L444-L480","documentation":"Error \"PCRE2 is not available in this build of ripgrep\" thrown in BurntSushi/ripgrep.","triggerScenarios":"Thrown at crates/core/flags/hiargs.rs:462 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install a ripgrep build that includes the pcre2 feature","Rebuild ripgrep from source with `--features pcre2`","Remove the --pcre2 flag to use the default regex engine"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"3fce3b5bb0236da2df6d99672afb8a719642eca7","analyzedAt":"2026-08-06T01:39:05.073Z","schemaVersion":2}