pub fn capture_outer_and_inner<'a>(
content: &'a str,
regex: &Regex,
names: &[&str],
) -> Vec<(Match<'a>, Match<'a>)>
Expand description
Given the regex and the target string, find all occurrences of named groups within the string.
This method returns the tuple of matches (a, b)
where a
is the match for the entire regex
and b
is the match for the first named group.
NOTE: This method will return the match for the first named group, so the order of passed named groups matters.