I have a string in the following format
string s = \"This is a Test String.\\n   This is a next line.\\t This is a tab.\\n\'
I want to remo
Well... I would like you to understand more specific areas of space. \t is actually assorted as a horizontal space, not a vertical space. (test out inserting \t in Notepad)
If you use Java, simply use \v. See the reference below.
\h- A horizontal whitespace character:
[\t\xA0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000]
\v- A vertical whitespace character:
[\n\x0B\f\r\x85\u2028\u2029]
But I am aware that you use .NET. So my answer to replacing every vertical space is..
string replacement = Regex.Replace(s, @"[\n\u000B\u000C\r\u0085\u2028\u2029]", "");