// 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#""\K[^"]*?feedsportal.*?(?=")"#).unwrap();
let string = "src=\"http://rss.feedsportal.com/c/669/f/9809/s/3b7b71e8/sc/5/mf.gif\" border=\"0\" /><br clear='all'/><br /><br /><a href=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/rc/1/rc.htm\" rel=\"nofollow\"><img src=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/rc/1/rc.img\" border=\"0\" /></a><br /><a href=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/rc/2/rc.htm\" rel=\"nofollow\"><img src=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/rc/2/rc.img\" border=\"0\" /></a><br /><a href=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/rc/3/rc.htm\" rel=\"nofollow\"><img src=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/rc/3/rc.img\" border=\"0\" /></a><br /><br /><a href=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/a2.htm\"><img src=\"http://da.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/a2.img\" border=\"0\" /></a><img width=\"1\" height=\"1\" src=\"http://pi.feedsportal.com/r/199108411625/u/49/f/9809/c/669/s/3b7b71e8/sc/5/a2t.img\" border=\"0\" />";
let substitution = "";
// 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/