EDIT... GOT IT TO WORK... PROBLEM SOLVED!
Hello...
i try to regex this webside:
http://herald.uthgard.net/herald.php?view=stats&p1=guild&p2=g.GuildName&p5=g.GuildName&p6=teilzeitgamer&c=Go
it's a table of top players of a guild in a online-game.. i want to parse the following parts....
Name, Realm-Rank and "LastWeekRealmPoints" of the top 5 guild-players for my skin.....
if i try to regex with the following :
Code: Select all
(?siU).*LWRP</a></td></tr>[\r\n | \n]
(.*)[\r\n | \n]<tr class="TBLalb" style=""><td align="center" style="">6</td>
i can parse the following which contain all needed infos of top 5 players:
Code: Select all
<tr class="TBLalb" style=""><td align="center" style="">1</td><td style=""><a class="charname" href="herald.php?view=stats&p1=player&p2=Player&p3=DESC&p5=Player&p6=Snikch">Snikch </a></td><td style=""><a class="guild" href="herald.php?view=stats&p1=guild&p2=RPs&p3=DESC&p5=Guild&p6=TeilzeitGamer">TeilzeitGamer</a></td><td style=""><a class="class1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Class&p6=9">Infiltrator</a></td><td style=""><a class="race1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Race&p6=4">Saracen</a></td><td style=""><div align="right">47</div></td><td style=""><div align="right"><a class="realmrank" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=RR&p6=23">3L3</a></div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">277</div></td><td style=""><div class="realmpoints" align="right">97,399</div></td><td style=""><div class="lwrp" align="right">47,394</div></td></tr>
<tr class="TBLalb" style=""><td align="center" style="">2</td><td style=""><a class="charname" href="herald.php?view=stats&p1=player&p2=Player&p3=DESC&p5=Player&p6=Rocknrollronny">Rocknrollronny KingoftheBongo</a></td><td style=""><a class="guild" href="herald.php?view=stats&p1=guild&p2=RPs&p3=DESC&p5=Guild&p6=TeilzeitGamer">TeilzeitGamer</a></td><td style=""><a class="class1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Class&p6=4">Minstrel</a></td><td style=""><a class="race1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Race&p6=3">Highlander</a></td><td style=""><div align="right">47</div></td><td style=""><div align="right"><a class="realmrank" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=RR&p6=22">3L2</a></div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">420</div></td><td style=""><div class="realmpoints" align="right">94,597</div></td><td style=""><div class="lwrp" align="right">44,474</div></td></tr>
<tr class="TBLalb" style=""><td align="center" style="">3</td><td style=""><a class="charname" href="herald.php?view=stats&p1=player&p2=Player&p3=DESC&p5=Player&p6=Zsall">Zsall </a></td><td style=""><a class="guild" href="herald.php?view=stats&p1=guild&p2=RPs&p3=DESC&p5=Guild&p6=TeilzeitGamer">TeilzeitGamer</a></td><td style=""><a class="class1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Class&p6=6">Cleric</a></td><td style=""><a class="race1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Race&p6=1">Briton</a></td><td style=""><div align="right">47</div></td><td style=""><div align="right"><a class="realmrank" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=RR&p6=22">3L2</a></div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">722</div></td><td style=""><div class="realmpoints" align="right">83,837</div></td><td style=""><div class="lwrp" align="right">12,216</div></td></tr>
<tr class="TBLalb" style=""><td align="center" style="">4</td><td style=""><a class="charname" href="herald.php?view=stats&p1=player&p2=Player&p3=DESC&p5=Player&p6=Ahtan">Ahtan </a></td><td style=""><a class="guild" href="herald.php?view=stats&p1=guild&p2=RPs&p3=DESC&p5=Guild&p6=TeilzeitGamer">TeilzeitGamer</a></td><td style=""><a class="class1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Class&p6=4">Minstrel</a></td><td style=""><a class="race1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Race&p6=3">Highlander</a></td><td style=""><div align="right">44</div></td><td style=""><div align="right"><a class="realmrank" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=RR&p6=16">2L6</a></div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">417</div></td><td style=""><div class="realmpoints" align="right">32,745</div></td><td style=""><div class="lwrp" align="right">6,272</div></td></tr>
<tr class="TBLalb" style=""><td align="center" style="">5</td><td style=""><a class="charname" href="herald.php?view=stats&p1=player&p2=Player&p3=DESC&p5=Player&p6=Llex">Llex </a></td><td style=""><a class="guild" href="herald.php?view=stats&p1=guild&p2=RPs&p3=DESC&p5=Guild&p6=TeilzeitGamer">TeilzeitGamer</a></td><td style=""><a class="class1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Class&p6=1">Paladin</a></td><td style=""><a class="race1" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=Race&p6=4">Saracen</a></td><td style=""><div align="right">47</div></td><td style=""><div align="right"><a class="realmrank" href="herald.php?view=stats&p1=player&p2=RPs&p3=DESC&p5=RR&p6=15">2L5</a></div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">0</div></td><td style=""><div class="kills" align="right">286</div></td><td style=""><div class="realmpoints" align="right">26,015</div></td><td style=""><div class="lwrp" align="right">10,306</div></td></tr>
Now my Problem:
1. As you can see, the code contain dynamic links within the players-name. this link changes if the ranking of a player changes.
2. how can i grab the NAME , REALMRANK and LastWeekRealmPoints out of this changing code?..
for better understanding i marked the part i need with color red.. of the top 5 players
all the other links inside is not needed.. but how to parse if there is a change?
thank you for any advice or tips..
tried this for days ...
regards
doomerino