// 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)(?!(00)+)([0-9a-fA-F]{2,8})?(?!(00)+)").unwrap();
let string = "C86B0200554E0200C86B02000000000000000000270000008109000000000000EC6A050079750188810000004100002801000000000000000000010000020104000000000000000000000000000000000000000000000000F65FA45900000000FF0000002F0000000000000049000000403C9F5A000000000000000000000000FFFF330000000000000F06EAE8333536";
// 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/