I'm getting tired of looking around for a close enough example, time for some quick help! Here is my code:
preg_match_all( '#<li.*?>.*?</li>#s', $card_html, $activity );
I want to modify it so that the <li.*?> excludes the word Unplayed. (The word comes after the .*? and before the >.
Edit:
Want to catch: http://gamercard.xbox.com/en-US/Stallion83.card
<li >
<a href="http://live.xbox.com/en-us/GameCenter/Achievements?title=1464993792&compareTo=Stallion83">
<img src="http://tiles.xbox.com/tiles/vD/fP/1Gdsb2JhbA9ECgUPGgIfVl9TL2ljb24vMC84MDAwIAAAAAAAAPvgN6M=.jpg" alt="F.E.A.R. 3" title="F.E.A.R. 3" />
<span class="Title">F.E.A.R. 3</span>
<span class="LastPlayed">6/24/2011</span>
<span class="EarnedGamerscore">415</span>
<span class="AvailableGamerscore">1000</span>
<span class="EarnedAchievements">23</span>
<span class="AvailableAchievements">50</span>
<span class="PercentageComplete">46%</span>
</a>
</li>
<li class="Complete" >
<a href="http://live.xbox.com/en-US/GameCenter/Achievements?title=1096157212&compareTo=Im%20RedJ">
<img src="http://tiles.xbox.com/tiles/HI/L4/1Gdsb2JhbA9ECgQJGgYfVl4gL2ljb24vMC84MDAwIAAAAAAAAPvXggM=.jpg" alt="Call of Duty: WaW" title="Call of Duty: WaW" />
<span class="Title">Call of Duty: WaW</span>
<span class="LastPlayed">6/21/2011</span>
<span class="EarnedGamerscore">1500</span>
<span class="AvailableGamerscore">1500</span>
<span class="EarnedAchievements">66</span>
<span class="AvailableAchievements">66</span>
<span class="PercentageComplete">100%</span>
</a>
</li>
Dont want: http://gamercard.xbox.com/en-US/test.card
<li class="Unplayed"></li>
<li class="Unplayed"></li>
Thanks.