string text = "Hello World... Fine Thanku."; Regex rx = new Regex(@"\s*"); string outstr = rx.Replace(text, "\n").Trim(); TextBox2.Text = outstr;
/***********Output***************/ H e l l o W o r l d . . . F i n e T h a n k u . /********************/
/s*
/s+
@"\s{2,}"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)