Id do something like this myself. Except id probably not use look ahead and instead would approach it a different way. (I might even follow up with some code later if i get some time.)
In reply to Re^2: Arbitrary number of captures in a regular expression
by demerphq
in thread Arbitrary number of captures in a regular expression
by grinder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |