69
rated 0 times
[
75]
[
6]
/ answers: 1 / hits: 167606
/ 13 Years ago, mon, september 12, 2011, 12:00:00
Is there any way to have a regex in JavaScript that validates dates of multiple formats, like: DD-MM-YYYY or DD.MM.YYYY or DD/MM/YYYY etc? I need all these in one regex and I'm not really good with it. So far I've come up with this: var dateReg = /^d{2}-d{2}-d{4}$/;
for DD-MM-YYYY. I only need to validate the date format, not the date itself.
More From » regex