Struct grok::Pattern
[−]
[src]
pub struct Pattern { /* fields omitted */ }
The Pattern
represents a compiled regex, ready to be matched against arbitrary text.
Methods
impl Pattern
[src]
fn new(regex: &str, alias: BTreeMap<String, String>) -> Result<Self, Error>
[src]
Creates a new pattern from a raw regex string and an alias map to identify the fields properly.
fn match_against<'a>(&'a self, text: &'a str) -> Option<Matches<'a>>
[src]
Matches this compiled Pattern
against the text and returns the matches.