using System;
using System.Text.RegularExpressions;
namespace ConsoleApplication_C_Sharp
{
class Program
{
static void Main(string[] args)
{
string s = "c cpp csharp java python and php";
string[] words = Regex.Split(s, @"\W+");
foreach (string word in words) {
Console.WriteLine(word);
}
}
}
}
/*
run:
c
cpp
csharp
java
python
and
php
*/