http://qs321.pair.com?node_id=870017


in reply to Skip 2 new lines

Maybe you should show us a little sample because what you have shown is not consistent with the problem you describe (or at least not my understanding of it). As given the regex doesn't alter new line characters except in the unlikely context where \s+ is in your expression. That seems an unusual place to be worried about preserving paragraph breaks.

However, if indeed you want to preserve paragraphs where the \s+ is, the following may turn the trick for you:

s/"(?:(?<!\s)(?!\n\n)\s)+", " "//g;
True laziness is hard work