Code: Select all
$pattern = '/<span id="temp">.+<\/span>/';
// returns 16°C.
Code: Select all
<span id="temp">16°C</span>
I've tried using another pattern (+\d°C) but this doesn't return anything. Is there something that i am missing in terms of the original regular expression?