// 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"\d{2}\.\d+").unwrap();
let string = "Добрый день.
Как сформировать регулярное приложение, чтобы из подобного массива можно было вытаскивать координаты.
[3] => 17629,17629,\"ПОНТОННЫЙ, ВОКЗАЛ\",59.785067,30.627792,0,2,bus
[4] => 17630,17630,ДОРОГА НА КОЛПИНО,59.775908,30.653787,0,2,bus
К примеру чтобы я получил массив
[0] => 59.785067
[1] => 30.627792";
// 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/