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