I have been having some trouble writing regex to match previous names on this page: http://steamcommunity.com/id/TripleThreat/namehistory
To be clear, I want in an array the following:
- TripleThreat
- [FD] TripleThreat.blyat
- 9
and so on..
I have already tried writing the Regex but it was a disaster (Something I struggle with)
Here's what I wrote:
$page = file_get_contents(sprintf("http://steamcommunity.com/id/TripleThreat/namehistory"));
preg_match_all("/<span class=\"historyDash\">-<\/span>((.|\n)*)<\/div>/", $page, $matches);
foreach($matches[0] as $match) {
echo($match . "<br/>");
}
Any help is much appreciated :)