// 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)^\b[A-Z0-9._%+-]+\.?[a-zA-Z]{3}\.?[a-zA-Z]{4}\.?\d{2}\t\t[0-9:]{11}\t(\d{1})\t\b[A-Z0-9._%+-]+\t(\d{2,3})\t(\d{3})\t(\d{1,2})\t([*]?)\t(\w{1})\t\t\d{1}\t[0-9:]{11}\t[0-9:]{11}\t\b[A-Z0-9._%+-]+\.?[a-zA-Z]{3}\t\b[A-Z0-9._%+-]+[0-9]{2}\t.+\t([0-9]{1,2})\t\t([0-9]{3})\t\t.+\t\t\n").unwrap();
let string = "A135C001_130101_R0BF.mov.sync.01 13:22:56:11 2 A135C001_130101_R0BF 59 806 1 A 2 13:18:35:03 00:04:21:08 A135C001_130101_R0BF.mov A135C001_130101_R0BF 25000 0 1800 1068 ARRI A135C001_130101_R0BF.mov ";
// 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/