diff --git a/main.py b/main.py index afd470f..7649c1e 100644 --- a/main.py +++ b/main.py @@ -11,3 +11,6 @@ def canidates(letters, min=2, max=5): pos.append(word) return SPELL.known(pos) +def filter_pos(pos, regex): + pat = re.compile(regex) + return list(filter(pat.match,pos))