FlyBoy Posted September 7, 2004 Posted September 7, 2004 i have the following date vaidation regex pattern: [0-3]\d-(JAN|FEB| MAR|APR|MAY|JUN|J UL| AUG|SEP|OCT|NOV|D EC) -\d{4} i now its fine...i think that the days pattern is somewhat wrong isnt it? i mean you can enter nubers bigger then 31 right? so any idea how to fix it???? Quote
John_0025 Posted September 7, 2004 Posted September 7, 2004 It would also match 00 as the day and allow some unrealistic years (actually depends what you are doing. Anyway show how to only allow year 19xx or 20xx) (0[1-9]|[12][0-9]|3[01])-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)-(19|20)\d\d Quote
FlyBoy Posted September 7, 2004 Author Posted September 7, 2004 It would also match 00 as the day and allow some unrealistic years (actually depends what you are doing. Anyway show how to only allow year 19xx or 20xx) (0[1-9]|[12][0-9]|3[01])-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)-(19|20)\d\d sweeeeeeet!!! thanx again mate! im starting to understand this regexp thingy....(heared about it only before 2 days ago) :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.