Regex now handles versions that contain multiple '-' characters in the version.

This commit is contained in:
Henrik Engstrom 2014-07-03 18:57:48 -04:00
parent c3abb9fad4
commit 77aa9ea87e
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ object CrossVersionUtil
{
val ReleaseV = """(\d+)\.(\d+)\.(\d+)(-\d+)?""".r
val CandidateV = """(\d+)\.(\d+)\.(\d+)(-RC\d+)""".r
val NonReleaseV = """(\d+)\.(\d+)\.(\d+)(-\w+)""".r
val NonReleaseV = """(\d+)\.(\d+)\.(\d+)([-\w+]*)""".r
v match {
case ReleaseV(x, y, z, ht) => Some((x.toInt, y.toInt))
case CandidateV(x, y, z, ht) => Some((x.toInt, y.toInt))