// 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"(?im)This.*").unwrap();
let string = "\\u0000Sp?\\u0002\\u0001A\\u0000Sr?)\\u0004£\\u000Ex-opt-jms-destQ\\u0001£\\u0012x-opt-jms-msg-typeQ\\u0005\\u0000Ss?\\u0000\\u0000\\u0000W\\u0000\\u0000\\u0000\\n¡0ID:06ecf56f-d295-4458-a981-d5badbb5b1a7:1:1:1-95@¡\\u000Ftopic://MyTopic@@@@@@\\u0083\\u0000\\u0000\\u0001m^£\\u0019\\u0087\\u0000Sw¡9&This is a test message sent out at 2019-09-23 17:00:10 PM";
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/