Regular Expressions 101

Community Patterns

yyyy-mm

0

Regular Expression
PCRE (PHP <7.3)

/
^([0-9]{4,4})[-]([0-9]{2,2})$
/

Description

will validate year month format. YYYY-MM

Submitted by Shyamin Ayesh - 5 years ago