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

Method find

regex/src/re_bytes.rs:165–167  ·  view source on GitHub ↗

Returns the start and end byte range of the leftmost-first match in `text`. If no match exists, then `None` is returned. Note that this should only be used if you want to discover the position of the match. Testing the existence of a match is faster if you use `is_match`. # Example Find the start and end location of the first word with exactly 13 ASCII word bytes: ```rust # extern crate regex;

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

Source from the content-addressed store, hash-verified

163 /// # }
164 /// ```
165 pub fn find<'t>(&self, text: &'t [u8]) -> Option<Match<'t>> {
166 self.find_at(text, 0)
167 }
168
169 /// Returns an iterator for each successive non-overlapping match in
170 /// `text`, returning the start and end byte indices with respect to

Callers 5

find_literalsMethod · 0.45
prefix_atMethod · 0.45
prefix_atMethod · 0.45
parse_unicode_classMethod · 0.45

Calls 1

find_atMethod · 0.45

Tested by

no test coverage detected