Regular expression for date time format "MM/DD/YY HH:mm:ss AM/PM" in asp.net regular expression validator

asp.net, datetime, regex, validation

Solution

I highly recommend that you do not use regex for this. Instead, you should create your own validator (inherit BaseValidator) and use DateTime.TryParseExact to check that the value can be converted to DateTime.

Problem

Can anyone tell me the regular expression format for "MM/DD/YY HH:mm:ss AM/PM" to use it in a regular expression validator, in asp.net 2.0

Original source