my $str='one "two three" four five "six seven eight" nine'; my @list=grep defined, $str=~/"([^"]*)"|(\S+)/g; print join "\n", @list;
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
In reply to Re: Re: In need of a stupid regex trick
by CountZero
in thread In need of a stupid regex trick
by 87C751
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |