skip to main |

skip to sidebar



A regular expression to verify the date format mm/dd/yy



0

comments


at

2:42 PM

([1-9]|1[012])/([1-9]|[12][0-9]|3[01])/0[0-9]$This will verify if the date is mM/dd/yy, where m is optional. Example: 9/21/07 or 11/21/07 (0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\dThis will verify if the date is mm/dd/yyyy. Example: 12/12/2007



&;



&;

© 2007-2011 testsquad.org All Rights Reserved.