using System; using System.Text.RegularExpressions; public class Test { public static void Main() { string str = "*1, **1, **1, ***1, *2, **2, *2, *2, **3, *3"; string result = Regex.Replace(str, @"\s*(\*\*)", "\n$1"); Console.WriteLine(result); Console.ReadLine(); } }