You want to validate dates in the traditional formats mm/dd/yy, mm/dd/yyyy, dd/mm/yy, and dd/mm/yyyy.
Because of this, you have to choose how simple or how accurate you want your regular expression to be.
If you already know your subject text doesn’t contain any invalid dates, you could use a trivial regex such as cannot repeat more than two times or fewer than two times.
Solutions 3 through 6 restrict the month to numbers between 1 and 12, and the day to numbers between 1 and 31.
We use alternation (see Recipe 2.8) inside a group to match various pairs of digits to form a range of two-digit numbers.
We use capturing groups here because you’ll probably want to capture the day and month numbers anyway.