mg,
Instead of using a regular expression, why not try the Parse method on
the DateTime class? You can pass in any date time format that you want, and
it should parse it apart. It will throw an exception which you can trap, if
the format is not valid. Granted, this is expensive. The new version of
..NET will have a TryParse method, which will let you know if the string
matches the format you specify.
Using Parse/TryParse prevents you from having to know the regular
expression syntax and just the format that you want to be able to parse.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"mg" <mg@theworld.com> wrote in message
news:99**********************************@microsof t.com...
Does someone have RegularExpression code (C# WebForm) for server-side
validation of Date (mm/dd/yyyy) ... including leap year?