Use re to check date format.