From 4ef00aa28a57c4a74ab4952dc33f7ecf5d37126a Mon Sep 17 00:00:00 2001 From: wangweiye7840 Date: Thu, 25 Jan 2024 12:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9GenerateProblemListFromString?= =?UTF-8?q?2024=E4=B8=ADparse=E5=86=85=E5=AE=B9=E7=9A=84=E4=B8=80=E5=A4=84?= =?UTF-8?q?bug?= 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 78df2851..0627cd48 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -270,7 +270,7 @@ def GenerateProblemListFromString2024(data): #从来自.tex文件的字符串生 content = re.sub(r"^\[rep(\d+)\]","",content_raw).strip() meta = {"rep":re.findall(r"\[rep(\d+)\]",content_raw)[0].zfill(6)} else: # 方括号不以rep开始, 用s,r,u分别表示相同, 相关, 无关, 返回有这三个字段的字典 - content = re.sub(r"^\[.*\]","",content_raw).strip() + content = re.sub(r"^\[.*?\]","",content_raw).strip() metaraw = re.findall(r"^\[(.*?)\]",content_raw)[0] sameidraw = re.findall(r"s([\d,:]*)",metaraw) if not sameidraw == []: