/^\d{1,2}[\/-]\d{2,4}$/ should do it. One or two numbers, followed by either / or -, followed by either 2 or 4 numbers.
If you want to make sure that the month or year is within a certain range http://www.the-art-of-web.com/javascript/validate-date/ scroll to #2.
__________________
^_^
If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
* The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".
Last edited by WolfShade; 10-03-2012 at 07:19 PM..
|