I've tried to accomplish this with regex but it seems not to be working at all. I tried the same regex pattern with PHP, Javascript and it worked like a charm. I have no idea why it's not working with C#.
Here is my code sample:
Regex mysReg = new Regex(@"<form[^>]*action=""do\.php""[^>]*>(.*)<\/form>", RegexOptions.IgnoreCase | RegexOptions.Multiline);
MatchCollection form = mysReg.Matches(html);
If I remove the part <\/form>
the regex works ok but it doesn't get the content inside the parenthesis.
Now some of you will tell me to use "HtmlAgilityPack". I've tried to use it but, since I'm still unfamiliar with C#, I found it hard to work with it, since there is no documentation came with it.
So is there any way to work around this problem?