in reply to Re: matching comments
in thread matching comments

That fails on
/* outer /* mid */ /* mid */ outer */
Try:
($re = $_)=~s/((\Q$start\E)|(\Q$end\E)|.)/${['(','']}[!$2]\Q$1\E${[')' +,'']}[!$3]/gs; $re = join'|',map quotemeta,eval{/$re/}; warn $@ if $@ =~ /unmatched/; print join"\n",/($re)/g,"";