in emacs I sometimes use this regex
^J\([^^J]\) -> \1
means: replace every newline that is followed by something which is NOT a newline with only the thing, that followed the newline That way I get rid of all newlines within a paragraph but keep paragraphs (double-newlines)