// 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)^(.*)\.mkv\.mks").unwrap();
let string = "[FAL]Eromanga_sensei-_-01(1280x720 Hi10P HDTV AAC)[70E7F984].mkv.mks
[FAL]Eromanga_sensei-_-02(1280x720 Hi10P HDTV AAC)[DE189E73].mkv.mks
[FAL]Eromanga_sensei-_-03(1280x720 Hi10P HDTV AAC)[A1E5B711].mkv.mks
[FAL]Eromanga_sensei-_-04(1280x720 Hi10P HDTV AAC)[F521AC93].mkv.mks
[FAL]Eromanga_sensei-_-05(1280x720 Hi10P HDTV AAC)[A776CE16].mkv.mks
[FAL]Eromanga_sensei-_-06(1280x720 Hi10P HDTV AAC)[24244951].mkv.mks
[FAL]Eromanga_sensei-_-07(1280x720 Hi10P HDTV AAC)[DFC32A09].mkv.mks
[FAL]Eromanga_sensei-_-08(1280x720 Hi10P HDTV AAC)[783BDB48].mkv.mks
[FAL]Eromanga_sensei-_-09(1280x720 Hi10P HDTV AAC)[677E4FE9].mkv.mks
[FAL]Eromanga_sensei-_-10(1280x720 Hi10P HDTV AAC)[89B519B2].mkv.mks
[FAL]Eromanga_sensei-_-11(1280x720 Hi10P HDTV AAC)[12B783EA].mkv.mks
[FAL]Eromanga_sensei-_-12(1280x720 Hi10P HDTV AAC)[56ABD770].mkv.mks";
let substitution = "7z rn \"C:\\\\Users\\\\Matheus\\\\crunchyroll\\\\[FAL] Eromanga sensei (.mks).zip\" \"$1\\.mkv.mks\" \"$1.mks\"";
// 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/