in reply to Re^4: How to find the outermost pair of square brackets with a regex?in thread How to find the outermost pair of square brackets with a regex?
[^\[\]] does match newline.
>perl -le "print( qq{\n} =~ /[^\[\]]/ ?1:0) 1 [download]