Quick question. I am totally new to regular expressions and it seems every tutorial on the 'net tells me something different. So I was just wondering if someone would help get me started. Here's the html I'll be parsing:
<tr bgcolor="#f9f9f0" align="center" class="punkt">
<td align="left" height=17>163.28.3.5</td>
<td height=17>3128</td>
<td>transparent</td>
<td>Taiwan</td>
<td>10.10.2003</td>
<td><a href="/cgi-bin/whois.cgi?domain=163.28.3.5" target="_blank"><b>Whois</b></a></td>
</tr>
<tr bgcolor="#f9f9f0" align="center" class="punkt">
<td align="left" height=17>81.40.92.255</td>
<td height=17>80</td>
<td>transparent</td>
<td>Spain</td>
<td>10.10.2003</td>
<td><a href="/cgi-bin/whois.cgi?domain=81.40.92.255" target="_blank"><b>Whois</b></a></td>
. . . .
I want to extract the following values (ip, port, anonymity rating, country). Right now, I was just wondering if anyone could help with the IP (I'm coding in VisualBasic.NET) . What I came up with was:
But obviously that's wrong (tried it in a Regex evaluator). Anyone? It'd be much appreciated.
<tr bgcolor="#f9f9f0" align="center" class="punkt">
<td align="left" height=17>163.28.3.5</td>
<td height=17>3128</td>
<td>transparent</td>
<td>Taiwan</td>
<td>10.10.2003</td>
<td><a href="/cgi-bin/whois.cgi?domain=163.28.3.5" target="_blank"><b>Whois</b></a></td>
</tr>
<tr bgcolor="#f9f9f0" align="center" class="punkt">
<td align="left" height=17>81.40.92.255</td>
<td height=17>80</td>
<td>transparent</td>
<td>Spain</td>
<td>10.10.2003</td>
<td><a href="/cgi-bin/whois.cgi?domain=81.40.92.255" target="_blank"><b>Whois</b></a></td>
. . . .
I want to extract the following values (ip, port, anonymity rating, country). Right now, I was just wondering if anyone could help with the IP (I'm coding in VisualBasic.NET) . What I came up with was:
Visual Basic:
Dim reg As New Regex("<td align=:Pileft:Pf height=17>(<IP>(:d+)\.(:d+)\.(:d+)\.(:d+))")
But obviously that's wrong (tried it in a Regex evaluator). Anyone? It'd be much appreciated.