Using *, + and similar on a capture doesn't make much sense, and therefore neither does the result. If you wished to capture the separator, you should have used
@num = split /((?:a|b)+)/, $x; # @num = ('12','aba','34','ba','5')
In reply to Re: Regexp - groupings
by ikegami
in thread Regexp - groupings
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |