// 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)<!-- message -->([\s\S]*)<!-- \/ message -->").unwrap();
let string = "<!-- message -->
<div><b><font size=\"6\"><font color=\"Red\">Bilim ve Teknik dergisi Mayıs 2019 Sayısı Pdf</font></font></b><br />
<br />
<img src=\"https://scontent-dus1-1.xx.fbcdn.net/v/t1.0-9/59069640_871111339894885_8805863518755618816_n.jpg?_nc_cat=109&_nc_ht=scontent-dus1-1.xx&oh=2a71d0bc34cda6b45404c30624c75046&oe=5D6C1B30\" border=\"0\" alt=\"\" /><br />
<br />
<b><font size=\"5\"><a href=\"https://yadi.sk/i/oMnXUgBtTqKopg?fbclid=IwAR3KPXInlWCKFXuTKP1AU1VQGdsgvcDLdV9Px6YGOn3aU1tqAFz4Zo2J6PY\" target=\"_blank\">https://yadi.sk/i/oMnXUgBtTqKopg?fbc...1tqAFz4Zo2J6PY</a></font></b></div>
<!-- / message -->";
// 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/