Trying to remove all attributes except "src" from all html doms. like img or iframe.
Im using regex to do, but doesnt work;
inp = Regex.Replace(inp, @"(<\s*[a-z][a-z0-9]*.*\s)(style\s*=\s*"".*?"")([^<>]*>)", "$1 $3", RegexOptions.Singleline | RegexOptions.IgnoreCase);
What's the problem that I cant see?