From 972e2ec08af1286861d1a89e2d6b88735ef52869 Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Thu, 25 Jan 2024 11:13:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3GenerateProblemListFromString?= =?UTF-8?q?2024=E4=B8=AD=E7=9A=84=E4=B8=80=E5=A4=84=E6=AD=A3=E5=88=99?= =?UTF-8?q?=E8=A1=A8=E8=BE=BE=E5=BC=8F=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 工具v2/database_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/工具v2/database_tools.py b/工具v2/database_tools.py index 8594c2bd..78df2851 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -271,7 +271,7 @@ def GenerateProblemListFromString2024(data): #从来自.tex文件的字符串生 meta = {"rep":re.findall(r"\[rep(\d+)\]",content_raw)[0].zfill(6)} else: # 方括号不以rep开始, 用s,r,u分别表示相同, 相关, 无关, 返回有这三个字段的字典 content = re.sub(r"^\[.*\]","",content_raw).strip() - metaraw = re.findall(r"^\[(.*)\]",content_raw)[0] + metaraw = re.findall(r"^\[(.*?)\]",content_raw)[0] sameidraw = re.findall(r"s([\d,:]*)",metaraw) if not sameidraw == []: same_id_list = generate_number_set(sameidraw[0])