Regular Expressions 101

Community Patterns

DD/MM pattern

2

Regular Expression
PCRE (PHP <7.3)

/
^([0-2][0-9]|(3)[0-1])(\/)(((0)[0-9])|((1)[0-2]))$
/
gm

Description

Checks for DD/MM pattern must start and end with the digits no letters or other symbols allowed. Made by your good guy Levent M. (it accepts also 28+/02 but yhea one problem at a time right?)

Submitted by anonymous - 4 years ago