in reply to Re^4: Replace newlines only if not inside braces
in thread Replace newlines only if not inside braces
Nope. It doesn't matter. The group doesn't match a single newline, so it can be greedy. It will try to match either the brackets block or any other character which is not a newline. If it succeeds, then tries again to match the block or a non-newline character. If it fails, it will match the newline character (\n) and makes the replace.
Using the non-greedy quantifier, will do the same thing, but a little bit slower because it needs, unnecessary, to look ahead after each repetition (theoretically).