Currently I’m eliminating certain formatting tags from HTML strings, and would like to learn enough about regular expressions to be able to replace any formatting. For starters, this is what I’ve done, but I’d like it to work with any font size, family, etc:
p.body = p.body.Replace("line-height: 14px;", "");
p.body = p.body.Replace("font-family: Arial, Helvetica, sans;", "");
p.body = p.body.Replace("font-size: 11px;", "");
I’m actually not sure if regex can be used directly inside C# replace or not.
Helper function
Usage: