Returns an iterator over all the non-overlapping capture groups matched in `text`. This is operationally the same as `find_iter`, except it yields information about capturing group matches. # Example We can use this to find all movie titles and their release years in some text, where the movie is formatted like "'Title' (xxxx)": ```rust # extern crate regex; use regex::Regex; # fn main() { let
(
&'r self,
text: &'t str,
)
| 343 | /// # } |
| 344 | /// ``` |
| 345 | pub fn captures_iter<'r, 't>( |
| 346 | &'r self, |
| 347 | text: &'t str, |
| 348 | ) -> CaptureMatches<'r, 't> { |
| 349 | CaptureMatches(self.0.searcher_str().captures_iter(text)) |
| 350 | } |
| 351 | |
| 352 | /// Returns an iterator of substrings of `text` delimited by a match of the |
| 353 | /// regular expression. Namely, each element of the iterator corresponds to |
no test coverage detected