From fff319bd8bd34adee831d6346f0adae6913988a9 Mon Sep 17 00:00:00 2001 From: Bernard Cafarelli Date: Tue, 14 Jan 2020 16:29:58 +0100 Subject: [PATCH] Fix helper regex for python 3.7 --- pym/euscan/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/euscan/helpers.py b/pym/euscan/helpers.py index 639b32d..831bc51 100644 --- a/pym/euscan/helpers.py +++ b/pym/euscan/helpers.py @@ -384,7 +384,7 @@ def regex_from_template(template): # Replace ${\d+} #regexp = regexp.replace('${0}', r'([\d]+?)') - regexp = re.sub(r'(\$\{\d+\}(\.?))+', r'([\w\.]+?)', regexp) + regexp = re.sub(r'(\$\{\d+\}(\.?))+', r'([\\w\.]+?)', regexp) #regexp = re.sub(r'(\$\{\d+\}\.?)+', r'([\w]+?)', regexp) #regexp = re.sub(r'(\$\{\d+\}\.+)+', '(.+?)\.', regexp)