in reply to Re: split on the pattern of '),('
in thread split on the pattern of '),('

It is "workable" but kinda meh

#!/usr/bin/perl -- use strict; use warnings; use Text::CSV; use Data::Dump; my $str = '(1,"(text)", 123),(2,"(string)", 234),(...)'; my $csv = Text::CSV->new( { quote_char => '"', sep_char => ',', allow_loose_escapes => 1, empty_is_undef => 1, binary => 1, auto_diag => 1, } ); $csv->parse( $str ); dd [ $csv->fields() ]; __END__ ["(1", "(text)", " 123)", "(2", "(string)", " 234)", "(...)"]