你将如何把这个:Ruby或正则表达式来剥离多余的换行符
Dear Fred How are you? Regards John
进入这个:
Dear Fred How are you? Regards John
注:单,双中断是允许的,但仅此而已。例如,我们想要去的:
"Dear Fred\n\n\n\nHow are you?\n\n\n\n\n\n\nRegards\nJohn"到
"Dear Fred\n\nHow are you?\n\nRegards\nJohn"
但也应该适用于 “\ r \ n”。
对我来说,并发症设法应付各类新行的时候来了。 – 2010-09-25 18:00:29