blob: 1ed73203c377218a375f760056cd3c7d460ab92e (
plain)
1
2
3
4
5
6
7
8
9
|
use super::regex::Regex;
use std::str::FromStr;
pub fn parse_tile_link_ids(s: &str, php_file: &str) -> Vec<u32> {
let re = Regex::new(&format!(r#"(?is)<A href="{}\.php\?id=([0-9]+)"><IMG"#, php_file)).unwrap();
re.captures_iter(s).map(|cap| u32::from_str(cap.at(1).unwrap()).unwrap()).collect()
}
|