Regular Expressions 101

Community Library

Community Library Entry

1

Regular ExpressionOpen Workspace

"
^(2010)[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$|(^[0-3]?[0-9].[0-3]?[0-9].(2010)$)
"
gm

Description
Created·2022-03-16 19:33
Type·Match
Flavor·Java

Here's a regular expression to handle a specific year in the different forms of dates:

YYYY-MM-DD DD-MM-YYYY MM-DD-YYYY

Submitted by loganmcampbell
Open Workspace