I need to validate a date string for the format dd/mm/yyyy
with a regular expresssion.
This regex validates dd/mm/yyyy
, but not the invalid
I know it is a tangential answer to the question, but if the intention of the question is 'how do I validate a date?', then why not try letting the programming language do all the hard work (if you are using a language that can)?
e.g. in php
$this_date_object = date_create($this_date);
if ($this_date_object == false )
{
// process the error
}