From cd0a17146068e63521c38488ab90966abbe9801c Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 2 Sep 2021 13:36:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8A=82=E7=9B=AE=E5=8D=95=E6=89=BE=E4=B8=9C?= =?UTF-8?q?=E8=A5=BF=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list_key_finder.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 list_key_finder.py diff --git a/list_key_finder.py b/list_key_finder.py new file mode 100644 index 0000000..f80d8a7 --- /dev/null +++ b/list_key_finder.py @@ -0,0 +1,25 @@ +import re + +search = ["教学", "套路"] + +rf = open("result.txt", "w", encoding="gbk") + +with open("a.txt", "r", encoding="gbk") as f: + content = f.read(1 << 20) + result = re.findall(r"^(?P