string test = "test\ttest\n test\r";
string pa=@"[\t\n\r\s]";
string text = System.Text.RegularExpressions.Regex.Replace(test, pa, "", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
textBox1.Text = text;
Regex.Replace(input,"\s","");