I know this is a late answer, but it cannot always be guaranteed that the string is in this particular date format.
The date format, regular expression, or even a person cannot check certain dates because we donβt know if the user enters βmm / DD / yyβ or βDD / mm / yyβ. Typically, in some places you enter the day of the month first, while in other places you enter the month first. So, if they go into 06/09/2013, do they mean September 6th or June 9th?
source share