Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(?:(?:(0?[1-9]|1\d|2[0-8])[\/](0?[1-9]|1[0-2])|(29|30)[\/](0?[13-9]|1[0-2])|(31)[\/](0?[13578]|1[02]))[\/](0{2,3}[1-9]|0{1,2}[1-9]\d|0?[1-9]\d{2}|[1-9]\d{3})|(29)[\/](0?2)[\/](\d{1,2}(?:0[48]|[2468][048]|[13579][26])|(?:0?[48]|[13579][26]|[2468][048])00))$
/
mg

Description

Este código validará la fecha

Submitted by Carlos Osmar - 2 years ago