Login Register






My java code filter_list
Author
Message
RE: My java code #9
(02-03-2015, 12:45 AM)phyrrus9 Wrote: I wouldn't do it in Java, afaik sockets are a PITA. But if you know how to use them, just match a regex

start looking when this is matched:
Code:
</table><br/> <table border="0" cellspacing="0" cellpadding="5" class="tborder"> <tr> <td class="thead" colspan="2"><strong>Richest Users</strong></td> </tr> <tr> <td class="tcat" width="50%"><strong>User</strong></td> <td class="tcat" width="50%" align="center"><strong>Amount</strong></td> </tr>

then, follow this format:
Code:
<tr> <td class="trow1" width="50%"><a href="{link here}">{username}</a></td> <td class="trow1" width="50%" align="center">{amount}</td> </tr>
From personal experience and what others have said, regex tends to be the overly complicated way of parsing html, especially when you need to find lots of specific elements and such

But regex could be used for this kind of stuff, just wanted to throw that it there that you probably shouldn't use overly complicated regular expressions for complex html parsing

Reply





Messages In This Thread
My java code - by Master - 02-02-2015, 11:10 AM
RE: My java code - by Alex - 02-02-2015, 01:32 PM
RE: My java code - by Blunt - 02-02-2015, 02:50 PM
RE: My java code - by Eclipse - 02-02-2015, 08:59 PM
RE: My java code - by Master - 02-02-2015, 09:28 PM
RE: My java code - by Eclipse - 02-02-2015, 10:37 PM
RE: My java code - by phyrrus9 - 02-03-2015, 12:45 AM
RE: My java code - by m1kep - 02-11-2015, 09:05 AM
RE: My java code - by Strawberry - 02-28-2015, 05:40 AM
RE: My java code - by Master - 02-28-2015, 11:26 AM
RE: My java code - by Strawberry - 02-28-2015, 02:37 PM