in reply to Re: Matching date range with pure regex
in thread Matching date range with pure regex
After generating a regex like that, if you will be using it often, you might want to optimize it for common prefixes or suffixes./^(?:1950|1951|1952|1953|...|2049|2050)$/;
use Regex::PreSuf; my $re = presuf(1950..2050);
--
[ e d @ h a l l e y . c c ]
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Matching date range with pure regex
by Abigail-II (Bishop) on Feb 17, 2004 at 13:27 UTC |