// include the latest version of the regex crate in your Cargo.toml
extern crate regex;
use regex::Regex;
fn main() {
let regex = Regex::new(r"(?m)(\w+) \(Vendeur : '([^']*)' \/ Amazon : '([^']*)'").unwrap();
let string = "correspondent à l'ASIN B00WU8XXXX, mais les attributs suivants sont en conflit avec : product_type (Vendeur : 'APPLIANCE_ACCESSORY' / Amazon : 'CLEANING_AGENT'), ean (Vendeur : '400650819XXXX' / Amazon : '400650819XXXX'), item_package_quantity (Vendeur : '5' / Amazon : '10'";
// result will be an iterator over tuples containing the start and end indices for each match in the string
let result = regex.captures_iter(string);
for mat in result {
println!("{:?}", mat);
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Rust, please visit: https://docs.rs/regex/latest/regex/