Derokorian;11006276 wrote:Use the string you're trying to parse instead of the example string NogDog used to verify it works.
Dosent work
Im not sure if you meant like that
<?php
$string = <<<EOD
<span style="color: red;">Your Price</span>
EOD;
$before = preg_quote('<span style="color: red;">Your Price</span>:$', '/');
$after = preg_quote('<br>', '/');
if(preg_match('/(?<='.$before.')[^<]+(?='.$after.')/i', $string, $matches)) {
echo $matches[0];
}
else {
echo "Not found";
}
?>