A Regular Expression to match and valid date of birth (dd/mm/yyyy).
/^(?:0[1-9]|[12]\d|3[01])([\/.-])(?:0[1-9]|1[012])\1(?:19|20)\d\d$/
Matches:
- 28/02/2022
- 01/01/1980
- 14/12/2020
Non-Matches:
- 02/28/2022
See Also:
- 24-Hour Time (HH:mm:ss) Regular Expression
- 12-Hour Time (hh:mm:ss) Regular Expression
- Regular Expression For Year
- Date (dd/mm/yyyy) Regular Expression