/^(\d{1,2})([\/.-])(\d{1,2})\2(\d{2})$/
Beware, there is now a new capture group, so the year will be in backreference number 4 instead of 3, as before.
If you also want to allow M/D-YY, etc., you can use
/^(\d{1,2})[\/.-](\d{1,2})[\/.-](\d{2})$/
source
share