- or download this
use Data::Dumper;
my $string = '"I think" this fits "the \\"requirements presented\\" th
+en" again \\"I could "be wrong"';
print Dumper [split /\s+(?=(?:(?:(?:[^"\\]|\\")*"){2})*(?:\\"|[^"])*$)
+/, $string];
- or download this
"I think"
this
...
again
\"I could "be
wrong"
- or download this
I think
this
...
I could
be
wrong
- or download this
split /\s+(?=(?:(?:[^"]*"){2})*[^"]*$)/,$string