From b24b45ce7c6607a08c0bdb9113b14151f83f11a7 Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Thu, 11 Jun 2020 13:17:16 +0000 Subject: [PATCH] oeis: replace groups of non-alpha with spaces (#187) --- lib/adapter/cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapter/cmd.py b/lib/adapter/cmd.py index 7ecbdf30..be1df97f 100644 --- a/lib/adapter/cmd.py +++ b/lib/adapter/cmd.py @@ -133,7 +133,7 @@ def _get_command(self, topic, request_options=None): # Replace all non (alphanumeric, '-') chars with Spaces to delimit args to oeis.sh if topic.startswith("oeis/"): topic = topic[5:] - topic = re.sub('[^a-zA-Z0-9-]', ' ', topic) + topic = re.sub('[^a-zA-Z0-9-]+', ' ', topic) return cmd + [topic]