// 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)(?<=").+(?=")"#).unwrap();
let string = "href=\"https://imss91-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3A%2F%2Fcenturylink.na1.adobesign.com%2Fpublic%2Fesign%3Ftsid%3DCBFCIBAA3AAABLblqZhBnH-aa7sqykOcK27PtbXdtJ21a5jorYZXFoFlwN1HMlRMfrsjgSzpmLlJuRxnhPUR_9TCx5mtSqVMq3GOUc4Aw%26&umid=99FFF6C9-D44F-8E05-8958-2AB9CDA85C9D&auth=19120be9529b25014b618505cb01789c5433dae7-e5e1810cfabbcbf81e7d2124136d2ae10570948f\"";
// 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/