// 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"(?s)(?<=<br><b>).+?(?=<br>)").unwrap();
let string = " </table>
</td>
</tr>
<tr bgcolor=\"#257fba\">
<td height=\"17\" colspan=\"5\" valign=\"top\" align=\"right\"><font color=\"#FFFFFF\">Dienstag Sonnenscheindauer:</font></td>
<td height=\"17\" colspan=\"1\" valign=\"bottom\" align=\"center\"><font color=\"#FFFFFF\">6-7 Stunden</font></td>
</tr>
<tr bgcolor=\"#257fba\">
<td height=\"17\" colspan=\"5\" valign=\"top\" align=\"right\"><font color=\"#FFFFFF\">Niederschlags-Wahrscheinlichkeit: </font></td>
<td height=\"17\" colspan=\"1\" valign=\"bottom\" align=\"center\"><font color=\"#FFFFFF\">52 %</font></td>
</tr>
<tr>
<td colspan=\"6\" align=\"left\">
<br><b>Das Wetter in Reutlingen am Dienstag, 28.3.2017:</b> Am Vormittag wechselnd bewölkt bei 15 Grad, nachmittags sind neben Wolkenlücken bei 18 Grad auch Schauer möglich. Die Nacht verläuft wechselnd bewölkt bei Werten um 6 Grad.<br><br>
</td>
</tr>
<tr>
<td colspan=\"4\" align=\"right\">
<center>
<button type=\"button\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-arrow-left\"></span> Tag</button> <a href=\"/wetter/morgen/reutlingen/DE23046.html\"><button type=\"button\" class=\"btn btn-primary\">Tag <span class=\"glyphicon glyphicon-arrow-right\"></span></button></a>
</center>
</td>
<td colspan=\"2\" align=\"right\">
<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr> ";
// 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/