18531Re: [Clip] Insert blank line between every line of text
- Oct 13, 2008--- In email@example.com, "Flo" <flo.gehrke@...> wrote:
>Here's another one that true RegEx-aesthetes certainly would prefer...
> Why don't you write...
> ^!Replace ".\K\r\n(?!\r\n|\Z)" >> "\r\n\r\n" AWRS
> ...to prevent empty lines from being doubled?
^!Replace "(?<!^)\r\n(?!\r\n|\Z)" >> "\r\n\r\n" AWRS
Matches a CR/NL which is not positioned at start of a line (i.e. in
an empty line) and which is not followed by another CR/NL or which is
not positioned at end of subject (\Z), followed by an empty line.
- << Previous post in topic