From 30a45370bee4561938e880c2ed1973b136dec08a Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Tue, 7 Sep 2021 00:25:55 +0300 Subject: [PATCH] To 2099 --- image_classifier/image_classifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/image_classifier/image_classifier.py b/image_classifier/image_classifier.py index 8b7ef1a..28d9216 100755 --- a/image_classifier/image_classifier.py +++ b/image_classifier/image_classifier.py @@ -95,11 +95,11 @@ class image_classifier: self._log.debug(f"New path: {new_path}") os.makedirs(os.path.dirname(new_path), exist_ok=True) if not new_path: - match = re.search(r'(?P2[0-9]{3})[\-/\._]?(?P[0-1]?[0-9])[\-/\._]?(?P[0-3]?[0-9])', filename) + match = re.search(r'(?P20[0-9]{2})[\-/\._]?(?P[0-1]?[0-9])[\-/\._]?(?P[0-3]?[0-9])', filename) if match: new_path = os.path.join(dirname, match.group('year'), match.group('month'), match.group('day'), filename) if not new_path: - match = re.search(r'(?P[0-3]?[0-9])[\-/\._]?(?P[0-1]?[0-9])[\-/\._]?(?P2[0-9]{3})', filename) + match = re.search(r'(?P[0-3]?[0-9])[\-/\._]?(?P[0-1]?[0-9])[\-/\._]?(?P20[0-9]{2})', filename) if match: new_path = os.path.join(dirname, match.group('year'), match.group('month'), match.group('day'), filename) if not new_path: