// 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"Name:\s*(.*?)(<br>|\R)|Language:\s*(.*?)(<br>|\R)|Email:\s*(.*?)(<br>|\R)|Country:\s*(.*?)(<br>|\R)|cellNumber:\s*(.*?)(<br>|\R)|carBrand:\s*(.*?)(<br>|\R)|carModel:\s*(.*?)(<br>|\R)|carFuel:\s*(.*?)(<br>|\R)|carStatus:\s*(.*?)(<br>|\R)|carGear:\s*(.*?)(<br>|\R)|kmPassed:\s*(.*?)(<br>|\R)|productionYear:\s*(.*?)(<br>|\R)|carType:\s*(.*?)(<br>|\R)|Message:\s*(.*?)(\R)").unwrap();
let string = "> Name: نادر
> Email: NADERFHRAN@GMAIL.COM
> Language: ar
> Country: المملكة
> cellNumber: 0966532450848
> carBrand: mercedes-benz
> carModel: C-Series|C300
> carFuel: gasoline
> carStatus: brand-new
> carGear: automatic
> kmPassed: 0
> productionYear: 2017
> carType: smallCar
> Message: اللون الاسود او الابيض ويفضل موديل 2016 او 2017 ";
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/