2014-02-18 16 views
0

我正在編碼proxyleecher,但不是爲使用爬行程序的每個站點編寫不同的函數。現在我有一些頁面顯示在webbrowser控件中加載proxiy列表,所以我需要爲每個代理添加「:」,所以我將有ip:port而不是ipport,並且我可以使用正則表達式來獲取代理:無法修改每個hmmlelement的內聯網

  For Each cur As HtmlElement In brwsr.Document.All 
      If System.Text.RegularExpressions.Regex.IsMatch(cur.InnerText, "(\d{1,3}\.){3}\d{1,3}") Then 
       cur.InnerText = cur.InnerText & ":" 
      End If 
     Next 

但這不起作用,爲什麼?

回答

0

你有沒有試過用冒號的asci代碼?

cur.InnerText = cur.InnerText & ":"