redefine month pattern (explicit day truncation)

Regexes' grouping with parentheses and the definition of the
standard pattern just ahead of the month pattern allowed to spot
a plausible cause for the problem to retract all autogenerated
stamps.  In the present scope of pytest, the additional lookafter
now sufficies to enable the retraction of all five stamp pattern.
This commit is contained in:
Norwid Behrnd 2021-11-25 10:41:24 +01:00
parent 116a0a3aa3
commit 51aaed2d01

View file

@ -34,7 +34,7 @@ REGEX_PATTERNS = {
'SHORT': re.compile('^(\d{2,2})([01]\d)([0123]\d)([- _])'),
'COMPACT': re.compile('^(\d{4,4})([01]\d)([0123]\d)([- _])'),
'STANDARD': re.compile('^(\d{4,4})-([01]\d)-([0123]\d)([- _])'),
'MONTH': re.compile('^(\d{4,4})-([01]\d)([- _])'),
'MONTH': re.compile('^(\d{4,4})-([01]\d)(?!-[0123]\d)([- _])'),
'WITHTIME_AND_SECONDS': re.compile('^(\d{4,4})-([01]\d)-([0123]\d)([T :_-])([012]\d)([:.-])([012345]\d)([:.-])([012345]\d)([- _.])'),
'WITHTIME_NO_SECONDS': re.compile('^(\d{4,4})-([01]\d)-([0123]\d)([T :_-])([012]\d)([:.-])([012345]\d)([- _.])'),
'WITHSECONDS': re.compile('^(\d{4,4})-([01]\d)-([0123]\d)([T :_-])([012]\d)([:.-])([012345]\d)([:.-])([012345]\d)([- _])'),