Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
(?P<date>((19|20)\d{2})[-/.]([1-9]|1[012])[-/.]([1-9]|[12][0-9]|3[01]))
"
gm

Description

For Dates formatted YYYY-M-D separated by Dot (.) Dash(-) or Slash(/) like (2021-9-2) without leading Zeros for single digit Month and Day.

Submitted by QuickRegEx - 4 years ago