Successfully added
Regular Expression (RegEx)
by Patrik
RegEx to extract link (a) with href only
string pattern = @"(<a.*?(?<href>href=\x22.*?\x22).*?>)"; string substitution = "<a ${href}>"; RegexOptions options = RegexOptions.Multiline; Regex regex = new Regex(pattern, options); string result = regex.Replace(input, substitution);
Additional information for Substitutions in Regular Expressions
Referenced in:
Comments