Fix helper regex for python 3.7

This commit is contained in:
Bernard Cafarelli 2020-01-14 16:29:58 +01:00
parent 8e25050f4a
commit fff319bd8b
No known key found for this signature in database
GPG Key ID: 5A761FC3AEC20F13
1 changed files with 1 additions and 1 deletions

View File

@ -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)