// 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"\b\d+(?:\.\d+)").unwrap();
let string = "t=APTO&ty=c&p=d&b=1\">13.49M</a>, <a class=\"screener-link\" href=\"quote.ashx?t=APTO&ty=c&p=d&b=1\">-</a>, <a class=\"screener-link\" href=\"quote.ashx?t=APTO&ty=c&p=d&b=1\"><span style=\"color:#008800;\">1.53</span></a>, <a class=\"screener-link\" href=\"quote.ashx?t=APTO&ty=c&p=d&b=1\"><span style=\"color:#008800;\">53.00%</span></a>, <a class=\"screener-link\" href=\"quote.ashx?t=APTO&ty=c&p=d&b=1\">8,030,287</a>, <a class=\"screener-link\" href=\"quote.ashx?t=EVOK&ty=c&p=d&b=1\">2</a>, <a class=\"screener-link\"
";
// 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/