Permalink
Browse files

Fixed regex to handle multi-digit version numbers

  • Loading branch information...
jpihl committed Jun 20, 2018
1 parent 6cbadc5 commit 677838b978242c4a8dc93a14f3679cef9681d6f3
Showing with 11 additions and 11 deletions.
  1. +11 −11 setup.py
View
@@ -16,18 +16,18 @@
regex = re.compile(
r"""
( # Group and match
VERSION # Match 'VERSION'
\s* # Match zero or more spaces
= # Match and equal sign
\s* # Match zero or more spaces
) # End group
( # Group and match
VERSION # Match 'VERSION'
\s* # Match zero or more spaces
= # Match and equal sign
\s* # Match zero or more spaces
) # End group
'
( # Group and match
\d\.\d\.\d # Match digit.digit.digit e.g. 1.2.3
) # End of group
'
' # Match '
( # Group and match
\d+\.\d+\.\d+ # Match digit(s).digit(s).digit(s) e.g. 10.2.3
) # End of group
' # Match '
""", re.VERBOSE)
for line in fd:

0 comments on commit 677838b

Please sign in to comment.