use strict;
my $str = 'c5604d659e4a4dee8f16d4449e3d94cd,1626656731,2021-07-18 19:05:31,,1289,5,0,3,2,0,1,1,,www.hp44clk.com,1,0,0.0,CPC,0.0,RPC,79545831,589aebf897e9c85c062871888fbdbb59,,,,,,0,,0,N/A,107.77.227.150,"""Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1""",en-us,,,,,,,iOS,14.6,Apple,,Mobile,en,Safari,,United States,Hawaii,Kailua,744,Att Mobility Llc,0,,Yes,No,No,0,AT&T Wireless USA,,,';
my $regex = qr/""".*?"""(*SKIP)(*FAIL)|(,)/mp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html