I’m using regular expressions in PHP to parse the weather results that Google provides when querying ‘weather in ‘.
Basically, I’ve managed to match every detail I require (humidity, wind, location name, etc) but I simply cannot match the current temperature in Celsius. Is anyone able to provide an expression which would match this?
<td style="font-size:140%;white-space:nowrap;vertical-align:top;padding-right:15px;font-weight:bold" rowspan=2>10°C | <a href="/setprefs?fheit=1&sig=0_vpPSh_He8v7GXjLf7MhO-wNqNOU=&prev=http://www.google.com/search%3Fq%3Dweather%2Bin%2Bwellington&sa=X&ei=3KVZUL6JMcWsiAfug4GQBQ&ved=0CB8QwwQ" class="fl">°F</a>
Sorry for the long paste, but the 10 degrees Celsius is near the start. Those are the two HTML tags that wrap around it.
How about this? :