Text box

Create a Web page that contains a text box which users can enter a date. Also include a button that executes the test() method to validate the date against a regular expression. Write a regular expression pattern that allows users to enter a one or two digit month, one or two digit date, and two or four digit year. Also, allow users to separate the month, day, and year by using either dashes or forward slashes. Users should be able to enter any of the following date formats: 1-25-07, 1-25-2007, or 01/25/2007