in reply to simple pattern match ?

I'm not sure you'll find a regexp-way to solve this in an accurate way.
You might want to process/validate the entry you get with DateTime::Event::Cron, somehow similar to the following:
#!/usr/bin/perl use strict; use warnings; use DateTime::Event::Cron; my @crontab = ( '*/3 15 1-10 3,4,5 */2', '* * * * 1-4,5-7,11,20', '* * * 1-4,5-7,11,20 *', '* * 1-4,5-7,11,20 * *', '* 1-4,5-7,11,20 * * *', '1-4,5-7,11,20 * * * *', ); my $set; foreach my $line (@crontab) { eval { $set = DateTime::Event::Cron->from_cron( $line ); }; print "$line: ", ($@ ? $@ : 'OK'), "\n"; }
The output of which is
*/3 15 1-10 3,4,5 */2: OK * * * * 1-4,5-7,11,20: Field value (20) out of range (1-7) * * * 1-4,5-7,11,20 *: Field value (20) out of range (1-12) * * 1-4,5-7,11,20 * *: OK * 1-4,5-7,11,20 * * *: OK 1-4,5-7,11,20 * * * *: OK
which might be easier to handle/debug then the output of a regexp check.

Hth.