bazz
04-19-2009, 02:39 AM
Hi,
I wonder if this regex could be shortened and remain effective.
if ($date =~ /^(\d{4})-(\d{2})-(\d{2})$/ )
{
print qq( the date format is yyyy-mm-dd );
}
Would you do it like that or would you just make sure it contained digits and '-' ?
bazz
I wonder if this regex could be shortened and remain effective.
if ($date =~ /^(\d{4})-(\d{2})-(\d{2})$/ )
{
print qq( the date format is yyyy-mm-dd );
}
Would you do it like that or would you just make sure it contained digits and '-' ?
bazz