I want to use regular expression for matching these date formats as below in C#.
- YYYY/MM/DD 2013/11/12
- YYYY/M/DD 2013/5/11
- YYYY/MM/D 2013/10/5
- YYYY/M/D 2013/5/6
I have tried some regular expressions but they can't match the 4 date formats. such as
^(19|20)\d\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])