my $regex = join '|', map $_ . '[a-z]' . ($_ + 1), 0 .. 8; ... my ($result) = $line =~ /($regex)/;
In reply to Re^4: arithmetic in a regex ?
by choroba
in thread arithmetic in a regex ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |