Regular Expressions 101

Library entries

Date & time regex test

Vote

0

Regular Expression
python

"
(?:(?P<EngDate>[a-zA-Z]+\s)??(?P<Date0>(?<!\.)(?:\d{1,2}(?=[,\s.\/-])|\d{4}))\.??(?(1),?)(?P<d_sep>[\s\.\/-])?(?:(?P<Date1>[^\W\d_]+|\d{1,2})(?(3)(?P=d_sep)))?(?(1)(?:\s\d{2}:\d{2}:\d{2}\s\w+\s)?)(?P<Date2>\d{2}|\d{4})(?!\:|\.|\d))|(?:(?<!\d{2})(?P<Hours>[0-2]?\d)[\:\.](?P<Minutes>[0-6]\d)(?:[\:\.](?P<Seconds>[0-6]\d))?(?:[,\.](?P<SenodsFraction>\d{3}|\d{6}))?(?:\so'clock)?(?:(?:[\.,\s,\w+\s]?(?:(?P<Z>(?:[a-zA-Z]{3,5})|(?:[+-]\d\d?:?[0,3,4]?[0,5]?))|(?P<s>PD|AM|PM|am|pm)))+)?)
"
gm

Description

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