Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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:

 

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.

Posted

n/m Found a site that had the regex. Here it is in case anyone wants it:

 

[1-2]?\d{1,2}\.[1-2]?\d{1,2}\.[1-2]?\d{1,2}\.[1-2]?\d{1,2}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...