// 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)^.+?\K(\,)").unwrap();
let string = "2009 CITROEN BERLINGO FIRST HDI 1.6 DIESEL, Cherry Red, PAS, Rear sliding doors, Locally owned .......................................NOW SOLD
2012 FORD GRAND C-MAX ZETEC 1.6 PETROL, 47,574 Miles, 1 Owner from New, 7 Seater...................................WAS £6,995 NOW £6,495!
2007 JEEP CHEROKEE SRI CD LIMITED EDITION, Sat Nav/ Radio, Leather Heated Seats ......................................................................SOLD!
";
let substitution = "\\t";
// 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/