using System;
using System.Text.RegularExpressions;
class Program
{
static void Main() {
string s = "c# .net desktopnetsoftware net programmingnet MS.NET";
Regex rgx = new Regex("net");
string[] arr = rgx.Split(s);
foreach (string element in arr)
Console.WriteLine(element.Trim());
}
}
/*
run:
c# .
desktop
software
programming
MS.NET
*/