summaryrefslogtreecommitdiff
path: root/abot.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-10 23:35:03 +0200
committerjomo <github@jomo.tv>2014-07-10 23:35:03 +0200
commit9af08cfe4f119ab3a806405a1da9ee4e22093ba5 (patch)
tree99af5b61c17f9f0cd1568983dd3af4ccc3429f6e /abot.py
parent55e3cbc137866584cac066a346500d8a8753418c (diff)
remove empty matchgroup; first match has to be a word
Diffstat (limited to 'abot.py')
-rw-r--r--abot.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/abot.py b/abot.py
index e18fe8e..6794814 100644
--- a/abot.py
+++ b/abot.py
@@ -5,13 +5,13 @@ rank_regex = "visitor|member|builder|trusted|helper|mod\\b|moderator|admin|owner
faq_regex = [
# ranks
- "(how.*? (get|be(come)?|)|who is|are you).*? (%s)|who owns.* server" % rank_regex,
+ "\\b(how.*? (get|be(come)?)|who is|are you).*? (%s)|who owns.* server" % rank_regex,
# WE
- "(can|how|why).*? (have|haz|use|get|doesn|can'?t).*? (WorldEdit|WE\\b|W\\.E\\.\\b)",
+ "\\b(can|how|why).*? (have|haz|use|get|doesn|can'?t).*? (WorldEdit|WE\\b|W\\.E\\.\\b)",
# clearing plot
- "((why|how).*? (do|can)|how to).*?( /?p clear| clear.*? plot)",
+ "\\b((why|how).*? (do|can)|how to).*?( /?p clear| clear.*? plot)",
# add someone to a plot, claim plot
- "how.*? (get|claim|own|add).*? plot"
+ "\\bhow.*? (get|claim|own|add).*? plot"
]
faq_regex = [reg_compile(reg.lower()) for reg in faq_regex]