replace \n\t to br c# code example Example: c# regex replace all line breaks Regex.Replace((text ?? "").Replace("'", @"\'").Trim(), @"[\r\n]+", " ");