Community Patterns

Community Library Entry

1

Regular Expression
Created·2016-04-19 21:31
Flavor·ECMAScript (JavaScript)

/
(^0[1-9]|[12][0-9]|3[01])-(0[1-9]|1[0-2])-(\d{4}$)
/
Open regex in editor

Description

Any date that as a valid month, a valid date and a year composed of 4 numbers. You can change the '-' caracter to any divider you want.

Submitted by anonymous