Using a quantifier (+,*,?,{m,n}) on a capture rarely makes sense. If you didn't want to capture: /(?:a|b)+/ or /[ab]+/. If you wanted to capture the whole separator: /((?:a|b)+)/ or /([ab]+)/.
Then there's the fact that your separator is probably not really a separator since one a matching pattern is found at the start of the string. This will cause you to have a leading empty field.
What are you expecting for output?
In reply to Re: Split operator in perl
by ikegami
in thread Split operator in perl
by binesh_28
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |