I want to add one space after every two characters, and add a character in front of every single character.
This is my code:
string str2; str2 = str1
[TestMethod] public void StackOverflowQuestion() { var input = "0123457"; var temp = Regex.Replace(input, @"(.{2})", "$1 "); Assert.AreEqual("01 23 45 7", temp); }