All right, I tried making a regular expression to encompass the entire chunk of code that repeats, but now preg_match_all is returning no matches.
$pattern = "/<tr bgcolor='#[0-9A-Fa-f]{6}'><td>
<div style=\"width: 58; overflow-x: hidden\">
[0-9]+\) <a title='Display Nation' href=\"nation_drill_display\.asp\?Nation_ID=([0-9]+)\">(.*?)<\/a>
<\/div>.*?<center>([0-9]*,?[0-9]+\.[0-9]{3})<\/td><\/center><td><center>([0-9]*,?[0-9]+\.[0-9]{2})<\/td><\/center><td><center>([0-9]*,?[0-9]+\.[0-9]{2})<\/td><\/center><td><center>[1-5]<\/td><\/center><td><center>
<img src='assets\/nuke\.gif' title=\"(This nation owns [0-9]{1,2} nuclear weapons\.|Nation supports nuclear weapons but does not own any\.|Nation does not support nuclear weapons\.)\">
<\/td><\/center><td><img src='images\/war\.gif' border=0 title='(War is an option|Peaceful Nation)'> <\/td><\/tr>/";
$string = "<tr bgcolor='#E6E6E6'><td>
<div style=\"width: 58; overflow-x: hidden\">
1) <a title='Display Nation' href=\"nation_drill_display.asp?Nation_ID=116286\">Ian Isles</a>
</div>
</td><td>5/6/2008 12:42:53 AM</td><td><center>16<br>Days</td></center><td><center>
<img border=\"0\" src=\"images/teams/team_Aqua.gif\" width=\"14\" height=\"13\" title=\"Team: Aqua\">
</td></center><td><center>42,574.764</td></center><td><center>5,689.99</td></center><td><center>2,675.34
</td></center><td><center>5</td></center><td><center>
<img src='assets/nuke.gif' title=\"This nation owns 20 nuclear weapons.\">
</td></center><td><img src='images/war.gif' border=0 title='War is an option'> </td></tr>";
The above input should match the regular expression. What's the issue here, do I need to cut out the white space and line returns beforehand, or is it something more?