[Solved] Change the output format of a string [closed]
[ad_1] A little bit quick’n’dirty, but you should get the idea. public static void Main(string[] args) { Regex regex = new Regex(“(([_ ]*[a-z]+)_ ?)+([_ ]*[a-z]+)”); string str = “a_b_c_ _ _abc_ _ _ _abcd”; Match match = regex.Match(str); // 2 – because of specific regex construction for (int i = 2; i < match.Groups.Count; i++) … Read more