[thelist] regex for date help

Matt Warden mwarden at gmail.com
Wed Aug 31 15:10:37 CDT 2005


On 8/31/05, Tom Dell'Aringa <pixelmech at yahoo.com> wrote:
> mm/dd/yyyy
> 
> I have the following regex:
> 
> /^\d{1,2}(\-|\/|\.)\d{1,2}\1\d{4}$/
> 
> It seems to not quite work - it denies stuff that is wrong, but does not allow the right one
> either...can anyone point out the mistake?

It looks fine. Are you sure there *is* a mistake? Can you give me an
example string that should work but doesn't?

-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list