It looks like you want to pull out outer-level matched braces. You might want to look at Text::Balanced.
split takes a regex, by the way.
In reply to Re: Need Regex help
by Roy Johnson
in thread Need Regex help
by cochrasc
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |