Matches dates in YYYY-MM-DD format.
^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$
2023-10-05
2023-13-01
Test and customize this pattern in our interactive editor