Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
(0?[1-9]|[12][0-9]|3[01])\/(0?[1-9]|1[012])\/\d{4}
/
gm

Description

find date format 31/04/2023 or 31/4/2023

(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/\d{4}

Submitted by anonymous - 2 years ago