in reply to Re: time validation
in thread time validation
I suspect there's a way to simplify that regular expression - too much repetition!if ($stringToTest =~ m/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})$/ & +& check_date($1, $2, $3) && check_time($4, $5, $6) ) { print "It's OK\n"; }
--
use JAPH;
print JAPH::asString();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: time validation
by AnomalousMonk (Archbishop) on May 19, 2009 at 15:49 UTC | |
by vnitinv (Initiate) on May 20, 2009 at 07:14 UTC | |
by AnomalousMonk (Archbishop) on May 20, 2009 at 15:21 UTC |