Let say I have two lines:
- oaupiimsplsvcsie
- apjhkutpoiegnxfx
I want to match any character [a-z] that is immediately followed by the same character.
The first line should match because of "ii", but the second line should not match.
Here is my example code that does not work:
fn helper_regex(text: &str) -> (bool, Vec<usize>) {
lazy_static! {
static ref RE: RegexSet = RegexSet::new(&[
r"[a-z]{1,}",
]).unwrap();
}
let matches: Vec<_> = RE.matches(text).into_iter().collect();
}