Function advent_of_code_2023::day_1::overlapping_matches
source · fn overlapping_matches<'a>(line: &'a str, pattern: &Regex) -> Vec<&'a str>
Expand description
Return regex matches that might overlap
let pattern = Regex::new(r"(eight|three)").unwrap();
let res: Vec<&str> = overlapping_matches("eighthree", &pattern);
assert_eq!(res, vec!("eight", "three"));