From f63312752f23471c3a0451c2562730fce2284b8f Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Wed, 11 Jul 2012 15:52:55 -0400 Subject: [PATCH] Fixing regex more. --- earwigbot/commands/dictionary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/earwigbot/commands/dictionary.py b/earwigbot/commands/dictionary.py index c7c4612..8a76efc 100644 --- a/earwigbot/commands/dictionary.py +++ b/earwigbot/commands/dictionary.py @@ -131,10 +131,10 @@ class Dictionary(Command): ("", ""), ("\[\[[^\]|]*?\|([^\]|]*?)\]\]", r"\1"), ("\{\{unsupported\|(.*?)\}\}", r"\1"), - ("\{\{(.*?) of\|([^}|]*?)\|?(.*?)\}\}", r"\1 of \2."), + ("\{\{(.*?) of\|([^}|]*?)(\|(.*?))?\}\}", r"\1 of \2."), ("\{\{w\|(.*?)\}\}", r"\1"), ("\{\{surname(.*?)\}\}", r"A surname."), - ("\{\{given name\|([^}|]*?)\|?(.*?)\}\}", r"A \1 given name."), + ("\{\{given name\|([^}|]*?)(\|(.*?))?\}\}", r"A \1 given name."), ] senses = []