Using Visual Studio and C#, How can I do the best way to parse a given string of downloaded html using regex to retrieve the proxies?
namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public string stringVar { get; set; }
private void button1_Click(object sender, EventArgs e)
{
WebClient wc = new WebClient();
stringVar = wc.DownloadString("http://somewebsitewithproxies.com/");
// some regex operation on stringVar here perhaps?
textBox1.Text = // ???
}
}
}
I will be using the regex expression:
\d{1,3}[.]\d{1,3}[.]\d{1,3}[.]\d{1,3}[:]\d{1,5}
I would like to have the variable 'stringVar' be parsed and the proxies set to textBox1. Would this be easy enough to do within the entire button click?
Thanks in advance.