I have a situation where commas are stripped when they shouldn't be, e.g.,
John 3:16,18,4:2 becomes John 3:16 18 4:2
I would like to put the commas back, and thought I could do it with
string strRegex = @"(\d+)\s+(\d+)";
RegexOptions myRegexOptions = RegexOptions.None;
Regex myRegex = new Regex(strRegex, myRegexOptions);
string strTargetString = @"John 3:16 17 4:3";
string strReplace = @"$1,$2";
return myRegex.Replace(strTargetString, strReplace);
but this just gives me
John 3:16,18 4:2
What am I missing?