diff --git a/lisp/subr.el b/lisp/subr.el index 036f414262a..d97598ab61f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7625,7 +7625,7 @@ as a list.") (directory-file-name dir)))) ;; This needs to match only the version strings that can be ;; generated by `package-version-join'. - (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\|snapshot\\)[0-9]+\\)*\\)\\'" subdir) + (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\|snapshot\\)[0-9]*\\)*\\)\\'" subdir) (match-string 1 subdir) subdir)) "-pkg.el"))