This works with perl. You may need to modify the regex to comply with ASP rules a bit, but it should work for any tag.
$file=~ s/(<\s*[az][a-z0-9]*.*\s)(style\s*=\s*".*?")([^<>]*>)/$1 $3/sig;
Where is the line html file.
Also this is in .net C #
string resultString = null; string subjectString = "<html style=\"something\"> "; resultString = Regex.Replace(subjectString, @"(<\s*[az][a-z0-9]*.*\s)(style\s*=\s*"".*?"")([^<>]*>)", "$1 $3", RegexOptions.Singleline | RegexOptions.IgnoreCase);
Result: <html >
source share