Help for this page

Select Code to Download


  1. 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];
    
  2. or download this
    "I think"
    this
    ...
    again
    \"I could "be
    wrong"
    
  3. or download this
    I think
    this
    ...
    I could
    be
    wrong
    
  4. or download this
    split /\s+(?=(?:(?:[^"]*"){2})*[^"]*$)/,$string