Strange character returned with regex.
Posted: Wed Aug 03, 2011 12:19 pm
My regular expression looks for this specific value inside an html document:
Html to find
It returns something else though : 16°C.
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?
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?