From ac9ea67edb48149c61500990f63d2fff3614ee48 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 14 Sep 2019 14:25:54 +1000 Subject: [PATCH] handle @x as well as @x@y, fixes #20 --- functions.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/functions.py b/functions.py index 777b358..3810a5d 100644 --- a/functions.py +++ b/functions.py @@ -101,7 +101,7 @@ def make_post(args): if bot['fake_mentions'] == 'never': # remove all mentions from the training data before the markov model sees it - posts = re.sub(r"@(\w+)@([\w.]+)\s?", "", posts) + posts = re.sub(r"(?