// 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)INVIMA [A-Z0-9-]+").unwrap();
let string = "<div class=\"productDescription\">NEUROBION 100MG/150MG CAJA X 30 TABLETAS<br><br>Modo de Uso: Vía Oral<br>Componente Activo: Vitamina B1 (Tiamina) Y Vitamina B6 (Piridoxina)<br>INVIMA 2019M-0009578-R1</div>
<div class=\"productDescription\">NEUROBION INYECTABLE X 3 AMPOLLAS<br><br>Modo de Uso: Vía Intramuscular<br>Componente Activo:Vitamina B1 (Tiamina) 100 Mg, Vitamina B6 (Piridoxina) 100 Mg Y Vitamina B12 (Cianocobalamina) 1 Mg. Solucion Inyectable Con Tecnología Doble Camara. <br>INVIMA 2015M-13939-R2<br><img class=\"\" data-src=\"/arquivos/RX.png?v=636054173313030000\" src=\"/arquivos/RX.png?v=636054173313030000\"></div>";
// 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/