// 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)'([\p{L}]+)").unwrap();
let string = "'가락시장(340)',
'가락시장(8)',
'가산디지털단지(7)',
'강남(222)',
'강남구청',
'강동',
'강동구청',
'강변(214)',
'개롱',
'개화산',
'거여',
'건대입구(212)',
'건대입구(7)',
'경복궁(317)',
'경찰병원(341)',
'고덕',
'고려대',
'고속터미널(329)',
'고속터미널(7)',
'공덕(5)',
'공덕(6)',
'공릉',
'광나루',";
// 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/