Regular Expression For Date Of Birth

Category: Strings | Views Total: 25 views

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:

Rate This Regex
Sending
User Review
0 (0 votes)

Leave a Reply