From: Kaio Cesar Date: Mon, 8 Jan 2024 18:53:50 +0000 (-0300) Subject: check if sed message matches with regex X-Git-Url: https://git.patchysicp.xyz/?a=commitdiff_plain;h=e786ed50ae777de45e078bfde03d087d436dbeab;p=angel.git check if sed message matches with regex closes #10 --- diff --git a/.gitignore b/.gitignore index 55247bc..8cd0f88 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ config.ini PythonSed +*#* \ No newline at end of file diff --git a/main.py b/main.py index 319dba5..9f69ee8 100644 --- a/main.py +++ b/main.py @@ -229,7 +229,7 @@ class AngelBot(ClientXMPP): sed.load_string(text) for message in self.messages[sender]["messages"]: - if sed_args[1] not in message: + if not re.match(sed_args[1], message): continue msg = io.StringIO(message) res = "\n".join(sed.apply(msg, None))