$string =~ s/(?!\])\n+/
/gs;