However, if I can simplify your example even further and assume that the first (\d+?) is always of fixed length (say 4 characters), then the following will give you what you want:
unpack("a4/A*", $_)
In reply to Re: Backref in a regex quantifier
by sfink
in thread Backref in a regex quantifier
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |