How can I parse quoted CSV in Perl with a regex?

前端 未结 7 1458
青春惊慌失措
青春惊慌失措 2020-11-30 09:10

I\'m having some issues with parsing CSV data with quotes. My main problem is with quotes within a field. In the following example lines 1 - 4 work correctly but 5,6 and 7 d

7条回答
  •  Happy的楠姐
    2020-11-30 09:43

    This works like charm

    line is assumed to be comma separated with embeded ,

    my @columns = Text::ParseWords::parse_line(',', 0, $line);

提交回复
热议问题