// 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#"(?ms)(?<!\w)\d+(?<!\")"#).unwrap();
let string = "
\"gnhgnghb grhgf ytjy 4444 rewgefgg gfbvc\" 234234 =2345234
sdhjaklf382as;ldfj asda2334= 76555
=123123
:1233
\"gnhgnghb grhgf ytjy4444 rewgefgg
gfbvc\"
\"gnhgnghb grhgf ytjy 4444 rewgefgg
gfbvc\"";
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/