IsDate or IsTime

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

How do you create a IsDate function using Regex in C#?
The function should check to see if the string is of a
date format (ie., 1/1/2000)

While I'm at it, how do you also create a IsTime function
using Regex? It checks to see if it's in 00:00 format,
military time (eg., from 00:00 to 23:59)

Thanks.
 
Wish I could give you a quick answer, but I can't. I'm a newbie to regex and
IMHO, this is a very cool, free tool:
http://www12.brinkster.com/ultrapico/Expresso.htm

Note that the author has included lots of built-in regexs to get you
started. I would also mention that date strings are a very localized thing.
American, European styles etc.

HTH,
Mike
 
Thanks for your assistance.
-----Original Message-----
Wish I could give you a quick answer, but I can't. I'm a newbie to regex and
IMHO, this is a very cool, free tool:
http://www12.brinkster.com/ultrapico/Expresso.htm

Note that the author has included lots of built-in regexs to get you
started. I would also mention that date strings are a very localized thing.
American, European styles etc.

HTH,
Mike




.
 
Back
Top