$_ = q{whatever "this" 'line is'}; my @elements; push @elements, $1 while /\G\s*"(.*?)"/gc or /\G\s*'(.*?)'/gc or /\G\s*(\S+)/gc; print map "<<$_>>", @elements;
In reply to Extract potentially quoted words by merlyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |