Function adblock::filters::network::compile_regex

source ยท
pub fn compile_regex(
    filter: &FilterPart,
    is_right_anchor: bool,
    is_left_anchor: bool,
    is_complete_regex: bool,
) -> CompiledRegex
Expand description

Compiles a filter pattern to a regex. This is only performed lazily for filters containing at least a * or ^ symbol. Because Regexes are expansive, we try to convert some patterns to plain filters.