Я бы предложил HTML-пакет Agility для работы с HTML.Вероятно, вы можете сделать это с помощью пакета Agility HTML:
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml("<p style=\"font - size: 11pt; font - family: Times; \">December 28, 2018</p><p style = \"font-size: 11pt;font-family: Times;\" > Dear Lisa,</ p >" +
"<p style=\"font-size: 11pt;font-family: Times;\"> I would love to grab coffee with you!<br clear = \"none\"> When does that work ? </ p >< p style = \"font-size: 11pt;font-family: Times;\" > Best Regards,</ p >");
foreach (var nodeData in doc.DocumentNode.SelectNodes("//text()"))
{
Console.WriteLine(nodeData.InnerText);
}
Отпечатки:
December 28, 2018
Dear Lisa,
I would love to grab coffee with you!
When does that work ?
Best Regards,