From 702f5c59729a48a2dec6a4c75337604005740afd Mon Sep 17 00:00:00 2001 From: jesopo Date: Tue, 2 Jul 2019 14:53:08 +0100 Subject: improve !ud regex --- modules/urbandictionary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/urbandictionary.py b/modules/urbandictionary.py index 1f147ed4..80ab63e6 100644 --- a/modules/urbandictionary.py +++ b/modules/urbandictionary.py @@ -4,7 +4,7 @@ import json, re from src import ModuleManager, utils URL_URBANDICTIONARY = "http://api.urbandictionary.com/v0/define" -REGEX_DEFNUMBER = re.compile("-n(\d+) \S+") +REGEX_DEFNUMBER = re.compile("-n ?(\d+) ") class Module(ModuleManager.BaseModule): _name = "UrbanDictionary" -- cgit v1.3.1-10-gc9f91