Function match_re

Source
pub fn match_re(re: &CompiledRE, s: &str) -> (bool, Vec<(usize, usize)>)
Expand description

Match a regular expression compiled with compile() against a string. Returns a tuple of a boolean (whether there was a match or partial match) and a vector of (position, length) tuples for all submatches, where the first element describes the match by the whole regular expression.