very clever...thanks.# the original number of integers to test (will be one-upped) my $i = 1; # the input string to be tested (a number) my $foo = shift; # see if the input string is a two-digit number my $rc = ($foo =~ m{ \b (??{ ++$i; qr{\d{$i}}; }) \b }xmsg) ?'Y' :'N';
In reply to Re^3: Calculating variable {n} in regex match
by atreyu
in thread Calculating variable {n} in regex match
by atreyu
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |