grouping regular expressions in C#

I’m trying to validate date, in C#

I need to check for the following formats:

dd/mm/yy
dd/mmm/yyyy
dd-mm-yy

e

Etc…

The below expression throws exception:

@"^(*d{2}+[-])+([w{3}]|[d{2}])+(d{2,4})$"

Kindly point out the error in the expression


Source: regex

Leave a Reply