I don't see why you shouldn't be able to capture separatly in principle, if there is a fixed upper number. But Perl 5 regex syntax doesn't support that. You could squish the redundancy by making the repeat stuff in a variable and interpolating it n times or with a x operator. That would give you the "in one place" nice thing for maintainability.
In reply to Re: Re: Re: Re: Re: Capturing brackets within a repeat group
by John M. Dlugosz
in thread Capturing brackets within a repeat group
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |