// 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)(?i)[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}").unwrap();
let string = "f36b9decc73e40bfb9a6250198a83fc0/SharePoint/source_28D4CE4DFC53AABB34B41E17BE9DEBBC/item__6761c90b-c1e0-4a91-b72c-e044e5b8cc56_1.0
F36B9DECC73E40BFB9A6250198A83FC0/SHAREPOINT/SOURCE_28D4CE4DFC53AABB34B41E17BE9DEBBC/ITEM__6761C90B-C1E0-4A91-B72C-E044E5B8CC56_1.0";
// 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/