From bf66e1069ff6162b2cbf1265128075bd33fd6712 Mon Sep 17 00:00:00 2001 From: wangqing <2773348732@qq.com> Date: Tue, 15 Apr 2025 17:26:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dwindows=E4=B8=8B?= =?UTF-8?q?=E5=8A=A0=E5=AF=86=E6=96=87=E4=BB=B6=E5=A4=B9=E6=97=B6=E7=9A=84?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jmpy/encrypt_py.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jmpy/encrypt_py.py b/jmpy/encrypt_py.py index 6dbc9c9..ab19495 100644 --- a/jmpy/encrypt_py.py +++ b/jmpy/encrypt_py.py @@ -38,10 +38,12 @@ def __exit__(self, exc_type, exc_value, traceback): def search(content, regexs): if isinstance(regexs, str): - return re.search(regexs, content) + escaped = re.escape(regexs) + return re.search(escaped, content) for regex in regexs: - if re.search(regex, content): + escaped = re.escape(regex) + if re.search(escaped, content): return True