From 1430126c44201f6f4e149d585e07ebb700b42e85 Mon Sep 17 00:00:00 2001 From: Stan James Date: Tue, 6 Feb 2018 15:10:49 -0700 Subject: [PATCH] regex verbose, so we can have comments --- bot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.py b/bot.py index 264226e..3bdbc74 100644 --- a/bot.py +++ b/bot.py @@ -27,13 +27,13 @@ class TelegramMonitorBot: self.safe_user_ids = map(int, os.environ['SAFE_USER_IDS'].split(',')) self.message_ban_patterns = os.environ['MESSAGE_BAN_PATTERNS'] - self.message_ban_re = re.compile(self.message_ban_patterns, re.IGNORECASE) + self.message_ban_re = re.compile(self.message_ban_patterns, re.IGNORECASE | re.VERBOSE) self.message_hide_patterns = os.environ['MESSAGE_HIDE_PATTERNS'] - self.message_hide_re = re.compile(self.message_hide_patterns, re.IGNORECASE) + self.message_hide_re = re.compile(self.message_hide_patterns, re.IGNORECASE | re.VERBOSE) self.name_ban_patterns = os.environ['NAME_BAN_PATTERNS'] - self.name_ban_re = re.compile(self.name_ban_patterns, re.IGNORECASE) + self.name_ban_re = re.compile(self.name_ban_patterns, re.IGNORECASE | re.VERBOSE) def ban_user(self, update):