Date Validation using Regular Expression

Problem

Write a regular expression in Perl to validate dates in the following format “mm/dd/yyyy”.  The month and day fields can be one or two digits.

Code

Here is a sample Perl code to do that

Add a Comment

Your email address will not be published. Required fields are marked *