I am trying to write a script that reads basketball results from yahoo. I am able to get the script finding the first result using the following regexp
$searchstring="<tr align=right valign=top><td align=left width=80%><a href=/nba/teams/([a-z]{3})/>([a-z]+)</a> at<br><a href=/nba/teams/([a-z]{3})/>([a-z]+)</a></td><td width=10%>([0-9]{2,3})<br>([0-9]{2,3})</td><td width=10%>([a-z]+)</td></tr>";
eregi($searchstring, $content, $regs);
so, the array $regs contains all the various chunks of regexps interspersed in $searchstring.
what I don't get is why the search stops after finding just one match. the pattern in $searchstring is the same for all the games, I am wondering how to reiterate the search in such a way that the pattern is found as many times as is present in the actual html page.