From cc69143496e0b639b574a55a13e9ee3b48e7e15a Mon Sep 17 00:00:00 2001 From: "weiye.wang" Date: Sun, 4 Feb 2024 12:00:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3GenerateProblemListFromString?= =?UTF-8?q?2024=E4=B8=AD=E5=85=B3=E4=BA=8E=E9=A2=98=E7=9B=AE=E5=89=8D?= =?UTF-8?q?=E7=BC=80=E7=9A=84=E4=B8=80=E4=B8=AAbug?= 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 f5ecab2c..1081cf02 100644 --- a/工具v2/database_tools.py +++ b/工具v2/database_tools.py @@ -288,7 +288,7 @@ def GenerateProblemListFromString2024(data): #从来自.tex文件的字符串生 same_id_list = [] related_id_list = [] unrelated_id_list = [] - content = re.sub(r"^\[rep(\d+)\]","",content_raw).strip() + content = re.sub(r"^\[[A-Za-z\d,\s]*?\]","",content_raw).strip() metaraw = re.findall(r"\[.*\]",content_raw)[0] metaraw = re.sub(r"[\[\]]","",metaraw) metalist = metaraw.split(",")