@@ -406,6 +406,14 @@ def self._parse(spec)
406406 m = /[-_](\d +\. \d +(?:\. \d +)?(?:-\d +)?)[-_.](?:i[36]86|x86|x64(?:[-_](?:32|64))?)$/ . match ( stem )
407407 return m . captures . first unless m . nil?
408408
409+ # devel spec
410+ # e.g. https://registry.npmjs.org/@angular/cli/-/cli-1.3.0-beta.1.tgz
411+ # e.g. https://github.com/dlang/dmd/archive/v2.074.0-beta1.tar.gz
412+ # e.g. https://github.com/dlang/dmd/archive/v2.074.0-rc1.tar.gz
413+ # e.g. https://github.com/premake/premake-core/releases/download/v5.0.0-alpha10/premake-5.0.0-alpha10-src.zip
414+ m = /[-.vV]?((?:\d +\. )+\d +[-_.]?(?i:alpha|beta|pre|rc)\. ?\d {,2})/ . match ( stem )
415+ return m . captures . first unless m . nil?
416+
409417 # e.g. foobar4.5.1
410418 m = /((?:\d +\. )*\d +)$/ . match ( stem )
411419 return m . captures . first unless m . nil?
@@ -414,6 +422,15 @@ def self._parse(spec)
414422 m = /-((?:\d +\. )+\d +[abc]?)[-._](?:bin|dist|stable|src|sources?)$/ . match ( stem )
415423 return m . captures . first unless m . nil?
416424
425+ # dash version style
426+ # e.g. http://www.antlr.org/download/antlr-3.4-complete.jar
427+ # e.g. https://cdn.nuxeo.com/nuxeo-9.2/nuxeo-server-9.2-tomcat.zip
428+ # e.g. https://search.maven.org/remotecontent?filepath=com/facebook/presto/presto-cli/0.181/presto-cli-0.181-executable.jar
429+ # e.g. https://search.maven.org/remotecontent?filepath=org/fusesource/fuse-extra/fusemq-apollo-mqtt/1.3/fusemq-apollo-mqtt-1.3-uber.jar
430+ # e.g. https://search.maven.org/remotecontent?filepath=org/apache/orc/orc-tools/1.2.3/orc-tools-1.2.3-uber.jar
431+ m = /-((?:\d +\. )+\d +)-/ . match ( stem )
432+ return m . captures . first unless m . nil?
433+
417434 # e.g. dash_0.5.5.1.orig.tar.gz (Debian style)
418435 m = /_((?:\d +\. )+\d +[abc]?)[.]orig$/ . match ( stem )
419436 return m . captures . first unless m . nil?
0 commit comments