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}/)
            {
                  print "OK";
            }
            else
            {
                  print "Error";
            }



Expecting  your wishes,
Pons.
____________________________________________________
Ponnambalam. M.A.
Philips Medical Systems,
Philips Innovation Campus,
#1,Murphy Road, Ulsoor.
Bangalore - 560008. INDIA
Phone : +91- 080 - 557 9000 Extn: 1013
E-mail: [EMAIL PROTECTED]
____________________________________________________

_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to