// 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#"href="(http.+appl(?:y|ica).*?)""#).unwrap();
let string = "<div>
<p>Erste Fragen beantwortet Ihnen gerne Elcin Rabatli-Klappenberger
unter <a href=\"tel:+49/839868144\"><span
class=\"brand-color text-bold\">0891/898568144</span></a>.</p>
<p>Bewerben können Sie sich einfach mit Ihrem Lebenslauf über unsere
<a href=\"https://www.pisegxel.de/java-spring-jee-softwareentwickler-architekt-muenchen\"
target=\"_blank\">
<p>Informationen über uns und zum Bewerbungsablauf
finden Sie unter <a href=\"https://www.isg.com/jobs/applications/applyForJobEntry.jsf?inseratnummer=83115&refererId=37\" target=\"_blank\"><span
class=\"brand-color text-bold\">www.pisegxel.de</span></a></p>
<span
class=\"brand-color text-bold\">>>> 1-Klick
Bewerbung</span></a> oder per Email über <a
href=\"mailto:jobs@pisdgexel.de\"><span
class=\"brand-color text-bold\">jobs@pissegxel.de</span></a></p>
<p><span class=\"brand-color text-bold\">Informationen zum Ablauf in
Bezug auf COVID 19:
</span><br />
<a href=\"https://www.pisegxel.de/application/java-spring-jee-softwareentwickler-architekt-muenchen\"
target=\"_blank\">
Vorstellungsgespräche können via Videokon­fe­renz
geführt werden. Alternativ
ist bei Präsenzterminen die Einhaltung der Hygienevorschriften gewährleistet.<br />
<a href=\"https://www.pisegxel.de/apply/form?job=333&test=2\"
target=\"_blank\">
<strong><em>Wir freuen uns auf Ihre Bewerbung!</em></strong>
</p>
</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/