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