use strict; while (<DATA>) { chomp; print "$_ is ", /^(?:19|20) (?: (?:(?<=19)[5-9]|(?<=20)[0-4])[0-9] | 50)$ /x ? "Ok" : "not ok", "\n" } __DATA__ 1050 1950 2050 2054 1980 2004 3100
In reply to Re: Matching date range with pure regex
by Roger
in thread Matching date range with pure regex
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |