Skip to content

Commit d521ea7

Browse files
committed
Use \d
1 parent 09f7a5b commit d521ea7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/antlib/scripts/parse_version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def snapshot_logic(omero_version):
7373
m = re.match((
7474
"^"
7575
"(?P<BASE>.*?)"
76-
"(?P<STRIP>([-]DEV)?-\d+-[a-f0-9]+?(-dirty)?)"
76+
"(?P<STRIP>([-]DEV)?-\\d+-[a-f0-9]+?(-dirty)?)"
7777
"(?P<ICE>-ice[0-9]+)?"
7878
"$"), omero_version)
7979
if m:
@@ -115,7 +115,7 @@ def incr_version(omero_version):
115115
omero_version = new_vers
116116
except:
117117
# But if that doesn't work, we brute force with regex
118-
m = re.match("^([^\d]*\d+[.]\d+[.])(\d+)-SNAPSHOT$", omero_version)
118+
m = re.match("^([^\\d]*\\d+[.]\\d+[.])(\\d+)-SNAPSHOT$", omero_version)
119119
if m:
120120
next = int(m.group(2)) + 1
121121
omero_version = "%s%s-SNAPSHOT" % (m.group(1), next)

0 commit comments

Comments
 (0)