in reply to Re: Simple way to parse whitespace separated, optionally quoted words out of a string
in thread Simple way to parse whitespace separated, optionally quoted words out of a string
Correct, but not nearly as neat as before. :-/ It does have the advantage that it can easily be extended to accept single quotes as well, though.my @word = do { my $i=0; grep $i++&1, m/ (")? ((?(1) [^"]* | \S+)) \1\s* /xg };
Makeshifts last the longest.
|
|---|