I want to parse all the link tags from html file. So for that I have written following regular expression as below.
var pattern = @"<(LINK).*?HREF=(""|')?(?<URL>.*?)(""|')?.*?>";
var regExOptions = RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Multiline;
var linkRegEx = new Regex(pattern , regExOptions );
foreach (Match match in linkRegEx.Matches(htmlFile))
{
var group = match.Groups["URL"];
var url = group.Value;
}
But what happens is that I found matches from html file but I am getting blank capturing group.