// 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)""".*?"""(*SKIP)(*FAIL)|(,)"#).unwrap();
let string = "c5604d659e4a4dee8f16d4449e3d94cd,1626656731,2021-07-18 19:05:31,,1289,5,0,3,2,0,1,1,,www.hp44clk.com,1,0,0.0,CPC,0.0,RPC,79545831,589aebf897e9c85c062871888fbdbb59,,,,,,0,,0,N/A,107.77.227.150,\"\"\"Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1\"\"\",en-us,,,,,,,iOS,14.6,Apple,,Mobile,en,Safari,,United States,Hawaii,Kailua,744,Att Mobility Llc,0,,Yes,No,No,0,AT&T Wireless USA,,,";
// 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/