Parse through string and delete tags and text

Lumo

New Member
The web request works fine and everything has gone as planned, but for some reason i cannot seem to grab and remove that one piece of the string. the removal below is one attempt of many, I don't have the source on my person, so I'll try to recreate it.\[code\]using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using System.Net; using System.Text;using System.IO;public partial class test : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){ if (!IsPostBack) { StringBuilder sb = new StringBuilder(); byte[] srs = new byte[8192]; HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http:"+//mywebsite.com/getsearchresults/page.aspx="+ result["x"]); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream xStream = response.GetResponseStream(); string myString = null; int count = 0; do { count = xStream.Read(srs, 0, srs.Length); if (count != 0) { myString = Encoding.ASCII.GetString(srs, 0, count); //regex ismatch = new myString.regex (@"\The Following Results Are\b") //ismatch = regex.replace("The Follwing Results Are","",1); sb.Append(myString); } } while (count > 0); printresults.Text = sb.ToString(); } }}\[/code\]
 
Back
Top