Regular Expressions 101

Library entries

Grab date (used with grab time for consistent results)

Vote

0

Regular Expression
python

"
(?P<EngDate>[a-zA-Z]+[\s\.])?(?P<Date0>(?:\d{1,2}(?=[\s,./-])|\d{4}))(?:\.(?=\ ))?(?(2),?)?(?P<d_sep>[\s,./-]\ ?)?(?:(?P<Date1>[^\W\d]+|\d{1,2})(?(3)\.?(?P=d_sep)))??(?P<Date2>\d{4}|\d{1,2})?(?P=d_sep)?(?=[日T\s])
"
gm

Description

Loading markdown...
Submitted by anonymous - a year ago