in reply to Re^3: Quick Regex Question
in thread Quick Regex Question

I need to do dd/mm/yyyy - I accidentally ignored my mistake within my error message. How would I switch your regex around to use dd/mm/yyyy instead of mm/dd/yyyy

Replies are listed 'Best First'.
Re^5: Quick Regex Question
by suaveant (Parson) on May 07, 2007 at 21:40 UTC
    Just switch before and after the first /
    /^(?:[01]\d\/[0-3]\d\/(?:19|20)\d\d)?$/
    But the test data you said you used was 03/30/2007 which is MM/DD/YYYY

                    - Ant
                    - Some of my best work - (1 2 3)