use super::regex::Regex; #[derive(Debug, Serialize)] pub struct DLListItem { name: String, value: String, } pub fn parse(s: &str) -> Vec { let reg_list_item = Regex::new(r#"(?is)(.*?).*?
(.*?)
"#).unwrap(); reg_list_item.captures_iter(s).map(|c| DLListItem { name: c.at(1).unwrap().into(), value: c.at(2).unwrap().into() }).collect() }