// 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"([A-Z]{3})(?:.*?)([A-Z]{3})(?:.*?)((\d{1,2}\/\d{1,2}\/\d{4})|(\d{1,2}(?:.*?)(January|February|March|April|May|June|July|August|September|October|December)( (\d{4}))?)|(\d{1,2}(?:.*?)(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)( (\d{4}))?))").unwrap();
let string = "TRZ dupa dupa dupa siurak KFR GTB GTT TGH 5 10 15 20:30 5/12/2587
dupa KGB TRZ dupa siurak KFR GTB 5 Jan ssdsdsdsd
dupa KGB TRZ dupa siurak KFR GTB 5 Jan 1235
dupa KGB TRZ dupa siurak KFR GTB 5 January sdsdsdsd
dupa KGB TRZ dupa siurak KFR GTB 5 January 2315";
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/