{"id":"46d83abcee3af2ff","repo":"BurntSushi/ripgrep","slug":"unrecognized-regex-engine-string","errorCode":null,"errorMessage":"unrecognized regex engine '{string}'","messagePattern":"unrecognized regex engine '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/core/flags/defs.rs","lineNumber":1819,"sourceCode":"wasn't included in your build of ripgrep, then using this flag will result in\nripgrep printing an error message and exiting.\n.sp\nThis overrides previous uses of the \\flag{pcre2} and \\flag{auto-hybrid-regex}\nflags.\n\"\n    }\n    fn doc_choices(&self) -> &'static [&'static str] {\n        &[\"default\", \"pcre2\", \"auto\"]\n    }\n\n    fn update(&self, v: FlagValue, args: &mut LowArgs) -> anyhow::Result<()> {\n        let v = v.unwrap_value();\n        let string = convert::str(&v)?;\n        args.engine = match string {\n            \"default\" => EngineChoice::Default,\n            \"pcre2\" => EngineChoice::PCRE2,\n            \"auto\" => EngineChoice::Auto,\n            _ => anyhow::bail!(\"unrecognized regex engine '{string}'\"),\n        };\n        Ok(())\n    }\n}\n\n#[cfg(test)]\n#[test]\nfn test_engine() {\n    let args = parse_low_raw(None::<&str>).unwrap();\n    assert_eq!(EngineChoice::Default, args.engine);\n\n    let args = parse_low_raw([\"--engine\", \"pcre2\"]).unwrap();\n    assert_eq!(EngineChoice::PCRE2, args.engine);\n\n    let args = parse_low_raw([\"--engine=pcre2\"]).unwrap();\n    assert_eq!(EngineChoice::PCRE2, args.engine);\n\n    let args =","sourceCodeStart":1801,"sourceCodeEnd":1837,"githubUrl":"https://github.com/BurntSushi/ripgrep/blob/3fce3b5bb0236da2df6d99672afb8a719642eca7/crates/core/flags/defs.rs#L1801-L1837","documentation":"Error \"unrecognized regex engine '{string}'\" thrown in BurntSushi/ripgrep.","triggerScenarios":"Thrown at crates/core/flags/defs.rs:1819 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a supported regex engine: 'default', 'pcre2', or 'auto'","Rebuild ripgrep with PCRE2 support if you need the pcre2 engine"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"3fce3b5bb0236da2df6d99672afb8a719642eca7","analyzedAt":"2026-08-06T01:39:05.073Z","schemaVersion":2}