// 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)<b><font[^>]*>(.*?)<\/").unwrap();
let string = "<div class=\"list-group font-12\"><div class=\"panel panel-default\"><div class=\"panel-heading\"><h3 class=\"panel-title\"><a href=\"https://kazua.net/bbs/download.php?bo_table=free&wr_id=4297amp;no=0\"><span class=\"label label-primary pull-right view-cnt\">132</span><i class=\"fa fa-download\"></i> <b><font color=428bca>미운 우리 새끼.E97.180722.360p-NEXT.mp4.torrent</font></b> (71.2K) <span class=\"en font-11 text-muted\"><i class=\"fa fa-clock-o\"></i> 13시간전</span></a></h3></div>";
// 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/