I'm trying to parse html page and I use the following regular expression:
var regex = new Regex(@"<tag1 id=.id1.>.*<tag2>", RegexOptions.Singleline);
"tag1 id =.id.1" occurs in document only once. "tag2" occurs nearly 50 times after the occurance of "tag 1". But when I try to match page code with my regular expression, it returns only 1 match. Moreover, when I change RegexOptions to "None" or "Multiline" no matches are returned. I'm very confused about this and would appreciate any help.