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

Method captures_iter

regex/src/re_bytes.rs:289–294  ·  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 std::str; use regex::bytes::Rege

(
        &'r self,
        text: &'t [u8],
    )

Source from the content-addressed store, hash-verified

287 /// # }
288 /// ```
289 pub fn captures_iter<'r, 't>(
290 &'r self,
291 text: &'t [u8],
292 ) -> CaptureMatches<'r, 't> {
293 CaptureMatches(self.0.searcher().captures_iter(text))
294 }
295
296 /// Returns an iterator of substrings of `text` delimited by a match of the
297 /// regular expression. Namely, each element of the iterator corresponds to

Callers 3

replacenMethod · 0.45

Calls 2

searcherMethod · 0.80
CaptureMatchesClass · 0.70

Tested by 2