You can't use + on parens like that to "remember" any number of matches - that's one of the reasons to have split. As for why it only gives the last part, is that matches are greedy (unless you tell them not to be) and will get the largest match they can - here the end of your string.
Cheers,In reply to Re: regex capturing problem
by erikharrison
in thread regex capturing problem
by pike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |