Regular Expressions 101

Library entries

Date with this format YYYY-MM-DD and year start 20 or 21

Vote

0

Regular Expression
pcre

/
/^(20|21)[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
/
date php

Description

Loading markdown...
Submitted by cisc0 - 7 years ago