Date format validation

Report a typo

Write a program using regular expressions that will check if the input date is valid. A valid date in this case is an actual date in the format DD/MM/YYYY. However, for now, let's make some assumptions to make the task easier and say that a day is a digit from 01 to 31 (regardless of the month); a month is a digit from 01 to 12; and a year should be between 1000 and 2999. Print True if a date is valid, and False otherwise.

Sample Input 1:

01/12/2018

Sample Output 1:

True
Write a program in Python 3
import re

string = input()
# your code here
___

Create a free account to access the full topic