Further to Solution 1 (and shamelessly stealing Maciej Los' delimiters) here's how I went about it
string str = "this is john, who are you?";
string strrev = "";
char[] punctuation = new char[] { ' ', ',', '.', ':', '\t', '?', '!', '@', '#' };
char[] inputAsChars = str.ToCharArray();
string temp = "";
foreach (char c in inputAsChars)
{
if (punctuation.Contains(c))
{
char[] tx = temp.ToCharArray();
Array.Reverse(tx);
temp = new string(tx);
strrev += temp + c;
temp = "";
}
else
temp += c;
}
System.Diagnostics.Debug.Print(strrev);
Produced this output
siht si nhoj, ohw era uoy?