Hi
I have following code that reads a webpage
using (Stream stream = request.GetResponse().GetResponseStream())
{
StreamReader sr = new StreamReader(stream);
htmlpage= sr.ReadToEnd();
sr.Close();
}
once i get the webpage I am trying to get my website urls extracted to make sure they are correctly being forwarded.
My problem is when i get url out, some come out fine while some have extra code infront and end of the url for example
(Javascrip:xyw('http://www.mysite.com/xyzpage.html')
I am trying to get rid of anything infront of and at the end of url so i end up with
http://www.mysite.com/xyzpage.html
I tried following, which doesnt work at all
string value = Regex.Match(str, @"\((\w+)\)").Groups[1].Value);
any idea how to write that regex as I am not good at it.