in reply to regex match in list context
Would work./("[^"]*?")/g
like this/("(?:\\"|[^"])*?")/g
There are several modules that you can use like Text::Balanced and Regexp::Commonmy $mm=qq(\"000.E+3\",\"\",\"\",\"\",\"QCA-086_2\",\"-1\",\"P\",\"FALS +E\",\"this \\\"is\\\" quoted\"); my @p = ($mm=~m/("(?:\\"|[^"])*?")/g); print $mm, "\n", map {qq($_\n)} @p; __OUTPUT__ "000.E+3","","","","QCA-086_2","-1","P","FALSE","this \"is\" quoted" "000.E+3" "" "" "" "QCA-086_2" "-1" "P" "FALSE" "this \"is\" quoted"
--
flounder
|
|---|