in reply to Can I use backreferences as quantifiers in a regex?
'4hhhh' =~ /(\d)(??{ "h{$1}"})/ [download]