Aloha,
I am trying to take a substring of a string and set it to another variable to be able to work with it. This is the code:
Regex divRegex = new Regex(@"<DIV id=compchart>(.*[\n*])</DIV>");
divSection = Convert.ToString(divRegex.Match(html));
What I am trying to do is the divSection string variable to one section of the html page which is the compchart div section. I need a regular expression between "<DIV id=compchart>" and "</DIV>" to be able to accept everything since the information contains html tags, attributes, and text. I thought the "." was a wildcard meaning any character except the "\n" so I added it in. This actually set my divSection string variable to Null or blank.
What is wrong with my regular expression that I am not getting that substring from the full html text?