in reply to Removing nested comments with regexes

Since the problem involves whole lines, you could split the multi-line string at line breaks, and use grep to ignore the lines you don't want:
@wanted_lines = grep !/^--/, split( /\n/, $string );