in reply to In need of a stupid regex trick

Here's a regex that almost works, but it leaves empty shards. Hence, grep...

local $_= q(one "two three" four five "six seven eight" nine); my @foo = grep {$_} /\G(?:(\w+)\s*)|(?:"([^"]*)"\s*)/g; local $,="\n"; print @foo, $/;
It works for your data, but I suspect it is very fragile.

After Compline,
Zaxo