Skip to main content

compile_whole_regex

Function compile_whole_regex 

Source
pub fn compile_whole_regex(
    text: &str,
    case: CaseMode,
    scope: RegexScope,
) -> Result<CompiledQuery, CompileError>
Expand description

Compile the entire query text as one regex (whole-query regex mode).

No parsing, no operators (ADR-0023) — the text is the pattern, matched against the file name or the full path per scope. Name scope reuses the literal prefilter; path scope falls back to a full scan (the path pool is not contiguous). One AND group, the regex left as the residual.

§Errors

Returns CompileError::Regex if text is not a valid regex or exceeds the compile size limit.