You can't do it with only regexp. There is a function in the
cfide/scripts/cfform.js file tht does about that. You can validate most
of it with

/^(0?[1-9]|[12]\d|3[01])\/(0?[1-9]|1[0-2])\/(\d{2}){1,2}$/

Then extract the day, month and year and see if the day is correct.

> -----Original Message-----
> From: Mark A. Kruger - CFG [mailto:[EMAIL PROTECTED]
> Sent: vrijdag 11 juni 2004 18:41
> To: CF-Talk
> Subject: OT: Regular expressions in JS (or in general) for dates
>
> Regex gurus,
>
> I have a string and I want to ensure that the date format is:
>
> xx/xx/xxxx or x/x/xxxx or x/x/xx (you get the idea)
>
> Does anyone have a stock regex for this?  Am I going to need
> more than 1 or can I look at everything (length, format and
> range of numbers) in 1 regex?
>
> -mark
>
>
>
> Mark A. Kruger, MCSE, CFG
> www.cfwebtools.com
> www.necfug.com
> http://blog.mxconsulting.com
> ...what the web can be!
>
>
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to