in reply to Re: Matching string containing values between 0 and 100 inclusive
in thread Matching string containing values between 0 and 100 inclusive
You should use Regexp::List from the same for distro when you have strings rather than patterns. It doesn't affect the outcome in this case, but let's not get into the habit of using the wrong tool.
perl -MRegexp::List -le'print Regexp::List->new->list2re(0..100)'
in 5.10 this would bypass demerphq's trie optimisation.
In 5.10, the equivalent of Regexp::Assemble would be:
my $re = join '|', 0..100;
and the equivalent of Regexp::List would be:
my $re = join '|', map quotemeta, 0..100;
|
|---|