using System; using System.Text.RegularExpressions; using System.Linq; public class Test { public static void Main() { var tokens= Regex.Matches("com.example.is-this@myname", @"\w+|\W") .Cast() .Select(x=>x.Value) .Reverse(); Console.WriteLine(string.Concat(tokens)); } }