Regular Expression For Date Of Birth

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:

Regex Is Copied!