I am using file_get_contents from a site that has data like this (I have copied only a bit of it):
<TD class=cellres align=left><a href=results.php?team=Wolves&league=EngPrem>Wolves</a></TD> <TD class=cellres align=left><a href=results.php?team=Liverpool&league=EngPrem><b>Liverpool</b></a></TD>
Here is my preg_match code:
preg_match('/<TD class=cellres align=left><a href=results.php?team=.*&league=.*>(.*?)<\/TD> /',$contents,$home);
echo $home[1] . '<br>';
As you can see, I am using multiple wildcards, the "team=" needs a wildcard and the "league=" needs another wildcard, all data has different teams and different leagues. The data I want is "Wolves" which is just before the tag. The code above I am not sure what is wrong with it, as it is not displaying any data. Anyone know why?