See split:
If the PATTERN contains parentheses, additional list elements are created from each matching substring in the delimiter.
So, if you don't want the additional list elements, don't use capturing parentheses. Use noncapturing parentheses (?: ... ) instead.
In reply to Re: Curios use of regular expressions in split
by Corion
in thread Curios use of regular expressions in split
by juliosergio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |