generalize one of the cases to handle many more kinds of formatting options

This commit is contained in:
miller86 2015-10-27 16:51:00 -07:00
parent c1be1a362b
commit 21e9d5c5c3

View File

@ -209,8 +209,8 @@ def parse_version_offset(path):
# e.g. foobar-4.5.1
(r'-((\d+\.)*\d+)$', stem),
# e.g. foobar-4.5.1b
(r'-((\d+\.)*\d+\-?([a-z]|rc|RC|tp|TP)\d*)$', stem),
# e.g. foobar-4.5.1b, foobar4.5RC, foobar.v4.5.1b
(r'[-._]?v?((\d+\.)*\d+[-._]?([a-z]|rc|RC|tp|TP?)\d*)$', stem),
# e.g. foobar-4.5.0-beta1, or foobar-4.50-beta
(r'-((\d+\.)*\d+-beta(\d+)?)$', stem),