From f97d452b07dfd0fc37a4acadec872aef515e6438 Mon Sep 17 00:00:00 2001 From: whamer100 Date: Fri, 5 Oct 2018 15:39:48 -0700 Subject: [PATCH] Update to regex in core.py This fixes the problem when ) is encountered --- PyDictionary/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyDictionary/core.py b/PyDictionary/core.py index e63d8dc..cb0681b 100644 --- a/PyDictionary/core.py +++ b/PyDictionary/core.py @@ -127,7 +127,7 @@ def meaning(term, disable_errors=False): for a in types: reg = str(lists[types.index(a)]) meanings = [] - for x in re.findall(r'\((.*?)\)', reg): + for x in re.findall(r'>\s\((.*?)\)\s<', reg): if 'often followed by' in x: pass elif len(x) > 5 or ' ' in str(x):