// 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)conf\_ant|PV00476|PV00011|PV00501|PV00511|PV00521|PV00496|PV00016|PV00491|PV00516|PV00015|PV00018|PV00506|PV00486|PV00014|PV00481|PV00013|PV00502|PV00494|PV00485|PV00495|PV00019|PV00505|PV00500|PV00504|PV00020|PV00012|PV00479|PV00477|PV00522|PV00520|PV00514|PV00499|PV00510|PV00507|PV00492|PV00475|PV00487|PV00017|PV00512").unwrap();
let string = "";
// 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/