FWIW:
>perl -wMstrict -le "my $s = '123 234 3456789 3210 34567'; ;; my @m = $s =~ m{ \b ((\d) (??{ qr{\d{$^N}} })) \b }xmsg; print qq{@m}; ;; my $i = 2; @m = $s =~ m{ \b (??{ ++$i; qr{\d{$i}}; }) \b }xmsg; print qq{@m}; " 234 2 3210 3 123 3456789
In reply to Re^2: Calculating variable {n} in regex match
by AnomalousMonk
in thread Calculating variable {n} in regex match
by atreyu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |