using System;
using System.Text.RegularExpressions;
namespace ConsoleApplication_C_Sharp
{
static class Program
{
static string ReplaceSpaces(string s)
{
return Regex.Replace(s, @"\s+", " ");
}
static void Main(string[] args)
{
string s = "c# java \r\nc \n c++ \t python ";
s = ReplaceSpaces(s);
Console.WriteLine(s);
}
}
}
/*
run:
c# java c c++ python
*/