MCPcopy Create free account
hub / github.com/davidblewett/rure-python / captures_iter

Method captures_iter

regex/src/re_unicode.rs:345–350  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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

Callers 1

replacenMethod · 0.45

Calls 2

searcher_strMethod · 0.80
CaptureMatchesClass · 0.70

Tested by

no test coverage detected