Regular expression for one or more white spaces, tabs or newlines
For all whitespace use:
\s+
for specific chars you can use:
[ \t\n]+
Other space characters are \r
and \f
currentLine = Regex.Replace(currentLine, @"\s+", " ");
+
is shorthand for 1 or more and \s
is "whitespace".