regex replace line feed with comma c# code example Example: c# string replace comma with newline string res = res.Replace(',', '\n');