using System;
using System.Text;
using System.Text.RegularExpressions;

namespace RegularExpressions
{
	class Tester
	{
		public void Run()
		{
			string s1 =
			   "Jeden,Dwa,Trzy Liberty Associates, Inc.";
			Regex theRegex = new Regex(" |, |,");
			StringBuilder sBuilder = new StringBuilder();
			int id = 1;

			foreach (string subString in theRegex.Split(s1))
			{
				sBuilder.AppendFormat(
				   "{0}: {1}\n", id++, subString);
			}
			Console.WriteLine("{0}", sBuilder);
		}


		static void Main()
		{
			Tester t = new Tester();
			t.Run();
		}
	}
}
