// 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#"(?mi)<div\sclass="[^>]*><a\s[^>]*><span[^>]*>[^>]*></i>[^>]*>[^>]*></i>\s(.*?)\s\([^>]*>[^>]*></a>"#).unwrap();
let string = "<div class=\"list-group font-12\"><a class=\"list-group-item break-word view_file_download at-tip\" href=\"https://kazua.net/bbs/download.php?bo_table=price&wr_id=3504&no=0&page=2\"><span class=\"pull-right hidden-xs text-muted\"><i class=\"fa fa-clock-o\"></i> 2018.07.25 02:37</span><i class=\"fa fa-download\"></i> tvN 식샤를 합시다 3 비긴즈.E03.180723.1080p-NEXT.mp4.torrent (209.7K) <span class=\"orangered\">+ 16</span></a>";
// 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/