I fetched email content via GMail Api and converted its Base64 Url encoded string to byte[] and converted to readable html string. My goal is to convert the html string to a parsable string without \r \n \"
var threadText = System.Text.Encoding.Default.GetString(threadBytes);
threadText = threadText.Replace("\r", string.Empty);
threadText = threadText.Replace("\n", string.Empty);
threadText = threadText.Replace("\\\"", "\"");
I have had a look at the value of threadText from GetString()
<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta content=\"width=device-width, initial-scale=1.0\" name=\"viewport\"/>\r\n
the replacing \r \n all work, but the \" doesn't work.
String manipulation is the last thing I would like to do.
Do we have some decent methods to strip these \r \n \" ?