in reply to Removing multiple newlines from a line using regex

Text::Balanced can be of use.

It would make multiple delimiters and the following easy to handle.

baz = ((one two, three four), five six)