From 4237347953ae32e6f0ad102a92ce8bce350af2fe Mon Sep 17 00:00:00 2001 From: 100gle <569590461@qq.com> Date: Fri, 19 Aug 2022 21:26:26 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E8=A1=A5=E5=85=85=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E8=A1=A8=E8=BE=BE=E5=BC=8F=E4=B8=80=E7=AB=A0=E7=BB=83=E4=B9=A0?= =?UTF-8?q?=E9=A2=98=E7=9A=84=E5=8F=82=E8=80=83=E7=AD=94=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- code/07/regex-quiz.py | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 code/07/regex-quiz.py diff --git a/code/07/regex-quiz.py b/code/07/regex-quiz.py new file mode 100644 index 0000000..7424ff3 --- /dev/null +++ b/code/07/regex-quiz.py @@ -0,0 +1,51 @@ +import re +import unittest + +FLAGS = re.X | re.S +REGEXP = r""" +(?P\d{4}(-\d{2}){2}) # date format like: YYYY-MM-DD + \s +(?P