Possible Duplicate:
How to parse and process HTML with PHP?
I am trying to extract values from some html. Here is the the part of the HTML document I am trying to get values from.
<input type="hidden" id="first"
value='€218.33' />
<input type="hidden" id="second"
value='€291.08' />
<input type="hidden" id="third"
value='€344.77' />
I have used the following preg match all command, where $buffer contains the entire html for the page I am searching.
if (preg_match_all('/<input type="hidden" id="(.+?)" value=\'€(.+?)\'/', $buffer, $matches))
{
echo "FOUND";
echo $matches[2][0] . " " . $matches[2][1] . " " . $matches[2][2] . "\n";
}
This preg match command is not finding any matches. Any suggestions?