Xee Posted October 11, 2003 Posted October 11, 2003 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. Quote
Xee Posted October 11, 2003 Author Posted October 11, 2003 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} Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.