There are 2 types of lines:
"August 1, 2011 <b> Manchester City </ b> Swansea City <font color = blue> 4: 0 </ font>";
"August 21, 2011 Bolton Wanderers <b> Manchester City </ b> <font color = blue> 2: 3 </ font>";
Those. in one, the name of the first team in <b> </ b>, in the other - the second team. Here is the page itself:
See the source code. With the help of preg_match_all
from each line you need to cut the date xx.xx.xxxx
name of the first command and the second (together with the <b></b>
, if present) and the score "4: 0". Already waved. Help.
preg_match_all('#([0-9]{2}\.[0-9]{2}\.[0-9]{4})((?:<b>)?.*(?:\s{2}<\/b>\s*)?)((?:<b>)?.*(?:\s{2}<\/b>\s*)?)<font.*>#', $games, $game);
I tried something like that, but not out because of the gaps ..