hello rustaceans, please i need help. Have not being able to solve this after almost a day + trying.
let re = Regex::new(r"^([a-z0-9_+]([a-z0-9_+.]*[a-z0-9_+])?)@([a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6})").unwrap();
let email="The efi example@gmail.com and lg@gmail.com ang gave me foo@example.com";
for element in re.captures_iter(email) {
println!("{:?}",email);
}
This is returning empty vector. If email is just one email, it return the email but after adding more, it's not iterating through the string and finding the correct match and print.
I don't know what I'm doing wrongly