Your first factorisation(sp?) is valid - (ab*){32766} and (ab+|a){32766} are equivalent, as they will both match and not match exactly the same strings (modulo any deficiencies in the Perl interpreter). Your second factorization is not equivalent, as the first regex allows for backslashed items, which the second doesn't:
#!/usr/bin/perl -w
use strict;
my @regexen = (
qr/"((?:\\.|[^"])+)"/,
qr/"([^"]+)"/,
);
for (<DATA>) {
for my $r (@regexen) {
print "$_\t";
print "\t$r";
if (/$r/) {
print "\tMatch\t($1)\n";
} else {
print "\tNo match.\n";
};
};
};
__DATA__
"foo\"bar"