pub fn find_iter<'r, 'c, C: Cursor>(
vm: &'r PikeVM,
cache: &'c mut Cache,
input: Input<C>,
) -> FindMatches<'r, 'c, C> ⓘ
Expand description
Returns an iterator over all non-overlapping leftmost matches in the given bytes. If no match exists, then the iterator yields no elements.
§Example
use regex_automata::{nfa::thompson::pikevm::PikeVM, Match};
let re = PikeVM::new("foo[0-9]+")?;
let mut cache = re.create_cache();
let text = "foo1 foo12 foo123";
let matches: Vec<Match> = re.find_iter(&mut cache, text).collect();
assert_eq!(matches, vec![
Match::must(0, 0..4),
Match::must(0, 5..10),
Match::must(0, 11..17),
]);