Merge every second line of string to previous one

HI,

How about the following expression?

System.Text.RegularExpressions.Regex.Replace(yourString,"([^\r\n]*)\r?\n([^\r\n]*(?:\r?\n|$))","$1$2")

Regards,

2 Likes