I have this regex expression which I have sourced from a 3rd party. When I use it, I get a "not a enough )'s" error. Regex is not my strong point, although I cannot see anything obviously wrong.
code:
StringCollection sc = new StringCollection();
// Issue with following line
sc.Add(@"<(meta|link|/?o:|/?style|/?div|/?std|/?head|/?html|body|/?body|/?span|![)[^>]*?>");
foreach (string s in sc)
{
html = Regex.Replace(html, s, "", RegexOptions.IgnoreCase);
}
return html;
Error:
parsing "<(meta|link|/?o:|/?style|/?div|/?std|/?head|/?html|body|/?body|/?span|![)[^>]*?>" - Not enough )'s.
Thoughts?