Apart from not validating whether the date is valid (it would get more
confusing and MUCH longer to do that, but it is possible) then I think
that's fine (although I haven't tested it!)

Paul

> -----Original Message-----
> From: Aidan Whitehall [mailto:[EMAIL PROTECTED] 
> Sent: 28 July 2003 11:41
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] RegEx date format
> 
> 
> This is a revisit and a symptom of my weak understanding of 
> RegExs. Does this look OK to you?
> 
> It's designed to see if a string is in the format yyyy-mm-dd, 
> allowing years from 1900-2099, months from 01 to 12 and days 
> from 01 to 31:
> 
>  
> reFind("((19)[0-9]{2}|(20)[0-9]{2})-((0[1-9]|1[0-2]))-((0[1-9]
> |[1-2][0-9
> ]|3[0-1]))", str)
> 
> I just want this to check the format; nothing more. Thanks.
> 
> 
> -- 
> Aidan Whitehall <mailto:[EMAIL PROTECTED]>
> Macromedia ColdFusion Developer
> Fairbanks Environmental Ltd  +44 (0)1695 51775
> Queen's Awards Winner 2003 <http://www.fairbanks.co.uk/go/awards>
> 
> ______________________________________________________________
> __________
> This e-mail has been scanned for all viruses by Star 
> Internet. The service is powered by MessageLabs. For more 
> information on a proactive anti-virus service working around 
> the clock, around the globe, visit: http://www.star.net.uk 
> ______________________________________________________________
> __________
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED] For human help, e-mail: 
> [EMAIL PROTECTED]
> 



-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to