// 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).*(https:\/\/cloud\.saikoanimes\.net\/.*)" c.*"#).unwrap();
let string = "
<a href=\"https://cloud.saikoanimes.net/11Yu\" class=\"btn-sa\" target=\"blank\">01</a>
<a href=\"https://cloud.saikoanimes.net/BXz\" class=\"btn-sa\" target=\"blank\">02</a>
<a href=\"https://cloud.saikoanimes.net/BXv\" class=\"btn-sa\" target=\"blank\">03</a>
<a href=\"https://cloud.saikoanimes.net/11Yx\" class=\"btn-sa\" target=\"blank\">04</a>
<a href=\"https://cloud.saikoanimes.net/BXt\" class=\"btn-sa\" target=\"blank\">05</a>
<a href=\"https://cloud.saikoanimes.net/BXw\" class=\"btn-sa\" target=\"blank\">06</a>
<a href=\"https://cloud.saikoanimes.net/11Yv\" class=\"btn-sa\" target=\"blank\">07</a>
<a href=\"https://cloud.saikoanimes.net/BXx\" class=\"btn-sa\" target=\"blank\">08</a>
<a href=\"https://cloud.saikoanimes.net/BXy\" class=\"btn-sa\" target=\"blank\">09</a>
<a href=\"https://cloud.saikoanimes.net/11Yo\" class=\"btn-sa\" target=\"blank\">10</a>
<a href=\"https://cloud.saikoanimes.net/11Ym\" class=\"btn-sa\" target=\"blank\">11</a>
<a href=\"https://cloud.saikoanimes.net/11Yw\" class=\"btn-sa final\" target=\"blank\">12</a> ";
let substitution = "$1";
// result will be a String with the substituted value
let result = regex.replace_all(string, substitution);
println!("{}", result);
}
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/