// 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)Stuff ").unwrap();
let string = "\"video_title\":\"Chubby soccer mom sucking my cock during her sons game\",\"defaultQuality\":[480,240,720,1080],\"vcServerUrl\":\"/svvt/add?stype=svv&svalue=144220772&snonce=ecjcjh6urryiu3oz&skey=d1d1f93a1d36b34372e7ec1e7573a0a93408ca24d85020acf76bb670315908a0&stime=1533904116\",\"mediaDefinitions\":[{\"defaultQuality\":false,\"format\":\"\",\"quality\":\"720\",\"videoUrl\":\"https:\\/\\/dm.phncdn.com\\/videos\\/201712\\/06\\/144220772\\/720P_1500K_144220772.mp4?ttl=1533907590&ri=1024000&rs=832&hash=4e134e89b30b666914112869908c3b73\"},{\"defaultQuality\":true,\"format\":\"\",\"quality\":\"480\",\"videoUrl\":\"https:\\/\\/dm.phncdn.com\\/videos\\/201712\\/06\\/144220772\\/480P_600K_144220772.mp4?ttl=1533907590&ri=1024000&rs=632&hash=9d42c16aac1c7a55b77a24a6fc4f9358\"},{\"defaultQuality\":false,\"format\":\"\",\"quality\":\"240\",\"videoUrl\":\"https:\\/\\/dm.phncdn.com\\/videos\\/201712\\/06\\/144220772\\/240P_400K_144220772.mp4?ttl=1533907590&ri=1024000&rs=368&hash=aebcfab4acd30f62c9a807c74791c18b
";
// 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/