// 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)...FS(K)-..\/.{2}\/..(.)\/\s.{2}").unwrap();
let string = "Fakturasadas : (S)FSK-69/23/GFK/12hjkhjkddddd
(S)FSK-69/23/GFK/12S Z (S)FSK-69/23/GFK/ 1 2 .)
FS-1195,1196,1197,2072,2073/24/GF/02, (S)FS-1195/24/GF/02, (S)FS-1196/24/GF/02, (S)FS-1197/24/GF/02, (S)FS-2072/24/GF/02, (S)FS-2073/24/GF/02 (S)FSK-69/23/GF/12
(S)FS-1499/24/GF/01 (S)FS-1500/24/GF/01";
// result will be an iterator over tuples containing the start and end indices for each match in the string
let result = regex.captures_iter(string);
for mat in result {
println!("{:?}", mat);
}
}
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/