From: [EMAIL PROTECTED]
> Dear Friends,
> I want to restrict the users from entering the wrong date.
> I tried with the following pattern , but it is not
> working. Please help me.
>
> Input : 12-03-2002 ( My request is , input should have 2
> digit ( minimum of 1) day , 2 digit ( minimum of 1)
> month, 4 digit year. I tried with the following,
>
> if($inp =~/(\d){1,2}-(\d){1,2}-(\d){4}/)
if($inp =~/^(\d{1,2})-(\d{1,2})-(\d{4})$/)
and you will probably want to test whether the day, month and year
fals into a range.
Jenda
=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain
I can't find it.
--- me
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs