Regex Matcher Builder (src/matcher.rs)

ripgrep · crates/regex/src/matcher.rs · rust · Unlicense
search, lang:rust, tag:regex, tag:matcher

Builder and matcher implementing grep_matcher::Matcher using regex-automata, supporting smart case, word matching, and line terminator optimizations for grep-style search.

// Source: https://github.com/BurntSushi/ripgrep | License: Unlicense
// Provided via justclaw.it.com; keep this notice with the code.
use {
    grep_matcher::{
        ByteSet, Captures, LineMatchKind, LineTerminator, Match, Matcher,
        NoError,
    },
    regex_automata::{
        Input, PatternID, meta::Regex,
        util::captures::Captures as AutomataCaptures,
    },
};

use crate::{config::Config, error::Error, literal::InnerLiterals};

/// A builder for constructing a `Matcher` using regular expressions.
///
/// This builder re-exports many of the same options found on the regex crate's
/// builder, in addition to a few other options such as smart case, word
/// matching and the ability to set a line terminator which may enable certain
/// types of optimizations.
///
/// The s

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key