in reply to Re: Complex Splitting
in thread Complex Splitting
That is, if you split on a bracketed group, capture it. If you don't have a bracketed group, split on nothing. Then filter out where the capture didn't match.@array = grep defined, split /(\[.*?\])|/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Complex Splitting
by johngg (Canon) on Feb 06, 2007 at 18:29 UTC | |
by Roy Johnson (Monsignor) on Feb 07, 2007 at 01:46 UTC |