From f81261991d575faefef1bfa030d250a5b49a1969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20Ta=C5=9Fkaya?= <47358913+isidentical@users.noreply.github.com> Date: Sun, 20 Oct 2019 00:57:56 +0300 Subject: [PATCH] use proper regex --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 40ecc28..55fef1f 100644 --- a/bot.py +++ b/bot.py @@ -320,7 +320,7 @@ def msg_ping(match: Match[str]) -> Response: @handle_message(r'.*\b(nano|linux|windows|emacs)\b', flags=re.IGNORECASE) def msg_gnu_please(match: Match[str]) -> Response: msg, word = match[3], match[4] - query = re.match(fr'(?i)gnu(\/|\+){word}', msg) + query = re.match(fr'gnu[/+]{word}', msg, flags=re.IGNORECASE) if query: return MessageResponse(match, f'YES! {query.match(0)}') else: