Well, I'm not gonna pretend that Regular Expressions are my thang (there are other people on this board who will probably be able to give you a better answer), but to me it looks like the problem comes down to your matching ".+".
As I recall regular expressions are by default "greedy". i.e. given a pattern such as ".+" they will try to match as much as possible in order to make the regular expression true.
In this case, the expression is matching all the way till the last "</li>" item in the html you are parsing. This is still a valid match by the regular expression.
From memory, the way to stop this is to prevent the expression from greedy matching, and the operator for this is "?". So, your new expression should probably look like: -
preg_match("/<OL><LI>.+?</LI>/", str_replace("\n","",$contents),$match);
Of course, if you just want to extract the List Item text, you can do this more easily in Perl than I reckon you are doing in PHP. At the moment $match[0] will just contain the whole expression that matches (as you probably will see). If you want just the List Item text then we may as well do that here as well. Simple enough - just add some brackets to your expression: -
preg_match("/<OL><LI>(.+?)</LI>/", str_replace("\n","",$contents),$match);
Now you should find in $matches[1] the value of that match. Anyhow - enough waffling - go look at [MAN]preg_match[/MAN] for a lot better detail than I can probably give.