Earlier I had help with a user telling me how to remove text within angle brackets inside of a string. This user proposed and I accepted the following:
var a = "some text follows<p><p>Give the following test text:</p>"
var newString = Regex.Replace(a, @"<(.|\n)*?>", string.Empty);
Now I realize there’s just a bit more I need to remove. Looking at the contents of the string I still see in the final string some instances of backslash n and backslash double quote. \n and \”
Is there an easy way that I can remove any instances of \n and \” that appear in my string. Ideally by adding some more to the above Regex?
I played around on rubular.com and came up with this as a regular expression. You can keep adding additional checks using the vertical pipe as a separator:
So your code would look like this (though you might need to escape the extra double quote in the regex):