How to get string after certain characters?

there is a line
<div class="col search_price discounted responsive_secondrow">
<span style="color: #888888;"><strike>29,17 rubles.</strike></span><br>14,17 RUB. </div>

need to get what comes after <br> and before </div>
April 4th 20 at 00:33
2 answers
April 4th 20 at 00:35
Solution
$re = '/<div class="col search_price discounted responsive_secondrow">
<span style="color: #888888;"><strike>of 29.17 RUB\.<\/strike><\/span><br>(.*)<\/div>/m';
$str = '<div class="col search_price discounted responsive_secondrow">
<span style="color: #888888;"><strike>29,17 rubles.</strike></span><br>14,17 RUB. </div>';

preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);

// Print the entire match result
var_dump($matches);
slightly changed the question because code <br> immediately disappeared - Geoffrey.Muller commented on April 4th 20 at 00:38
April 4th 20 at 00:37
Solution
Only the first occurrence: regex, code in php
All occurrences: regex, code in php

Find more questions by tags PHP