Regular Expressions 101

Community Patterns

1...34567...877

Date regex

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^(\d{2})\/(\d{2})\/(\d{4}) (\d{2}):(\d{2})$
/

Description

this regex check if the date is in the format d/m/Y H:i , it will not check the number of days in month

Submitted by Kristian lentino - 3 years ago