Here is this line of code protectedvoid Button1_Click(object sender, EventArgs e) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://nullskull.com/aboutus.aspx"); // Create WebRequest HttpWebResponse response = (HttpWebResponse)request.GetResponse(); // Initialise the connection StreamReader reader = new StreamReader(response.GetResponseStream()); // Start receving the Response and store it in to Stream and pass it to Stream reader string responseText = reader.ReadToEnd(); // Here we will apply regualr expression to responseText Regex re = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"); //string pattern is Email validation Expressioin MatchCollection me = re.Matches(responseText); String str = string.Empty; foreach(Match m in me) { str += m.Value + " , " ; } Response.Write(str); }
Here is this line of code protected
{
str += m.Value +
}
Response.Write(str);