% perl -le 'print "($1) " while "this_is_broken_" =~ /(.*?)_/sg' (this) % perl -le 'print "($1) " while "this_is_broken_" =~ /(.{0,}?)_/sg' (this) (is) (broken)