• Log in or sign up for an account here: https://www.sythe.org/login

Who can help me with searching a string within a string?

bl34ch127

Newcomer
Joined
May 20, 2007
Sythe Gold
0
Messages
21
Hi all, I am coding a client for a web based text game, and I am trying to rip the cpu speed from this html
HTML:
<table width=100% cellpadding=10 border=1 cellspacing=0>
<tr valign=top bgcolor=000000><td><center><small>Computer time format: 1217122389 Standard time format: 27-07-2008 03:33  [33.186.171.164]</small><br><br>
<h3>Hardware</h3><table>
	<tr><td><a href=index2.php?page=hardware&upgrade=cpu><img src=layout/upgrade.jpg border=0></a> Cpu speed: <td>4400 Mhz.<BR>
	<tr><td><a href=index2.php?page=hardware&upgrade=connection><img src=layout/upgrade.jpg border=0></a> Connection speed:<td> 100 Mbit (+- 11378 Kb/s download, 2844 Kb/s upload )<BR>

	<tr><td><a href=index2.php?page=hardware&upgrade=HD><img src=layout/upgrade.jpg border=0></a> Harddrive:<td>40 Gb capacity<tr><td><a href=index2.php?page=hardware&upgrade=extgb><img src=layout/upgrade.jpg border=0></a> External harddrive:<td>0.1 Gb capacity</table>
</td></tr></table>

<center>All contents on this site are copyrighted.<BR>
Powered by <a href=http://www.leaseweb.com target=_blank title='LeaseWeb Hosting'>LeaseWeb</a>

If anyone could help me I would really appreciate it :)
 
Two Factor Authentication User
You can use a Regular Expression pattern to find it.
Code:
' Data is the Html of the page that you are trying to parse.
Dim Speed = Integer.Parse(System.Text.RegularExpressions.Regex.Match(Data, _
                          "Cpu speed: <td>(\d+) Mhz.<BR>").Groups(1).Value)
You may want to read up on them, they make parsing strings a hell of a lot easier.
http://msdn.microsoft.com/en-us/library/hs600312.aspx
 
Runescape Gamblingrunescape gambling
Back
Top