// 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)[\u02BB\u02BC\u066C\u2018-\u201A\u275B\u275C]").unwrap();
let string = "ʻ - 02BB MODIFIER LETTER TURNED COMMA
ʼ - 02BC MODIFIER LETTER APOSTROPHE
٬ - 066C ARABIC THOUSANDS SEPARATOR
‘ - 2018 LEFT SINGLE QUOTATION MARK
’ - 2019 RIGHT SINGLE QUOTATION MARK
‚ - 201A SINGLE LOW-9 QUOTATION MARK
❛ - 275B HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT
❜ - 275C HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT";
// 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/