in reply to interpolating code in regex brace quantifier
Sure, you can interpolate there.
my $num_zeds = "13"; /z{$num_zeds}/
But you don't want interpolation. You want something like the following:
/(a+)(??{ 'x{'.length($1).'}' })/
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: interpolating code in regex brace quantifier
by grobber (Novice) on Mar 08, 2019 at 23:25 UTC | |
by ikegami (Patriarch) on Mar 09, 2019 at 22:18 UTC |