Skip to content

Commit 664c060

Browse files
committed
account for prerelease label having - wherever and having digits
1 parent 6af57fc commit 664c060

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/code/LocalServerApiCalls.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ private FindResults FindNameHelper(string packageName, string[] tags, bool inclu
260260
string actualPkgName = packageName;
261261

262262
// this regex pattern matches packageName followed by a version (4 digit or 3 with prerelease word)
263-
string regexPattern = $"{packageName}" + @".\d+\.\d+\.\d+(?:-[a-zA-Z0-9]+|.\d)?.nupkg";
263+
string regexPattern = $"{packageName}" + @".\d+\.\d+\.\d+(?:[a-zA-Z0-9-.]+|.\d)?.nupkg";
264264
Regex rx = new Regex(regexPattern, RegexOptions.Compiled | RegexOptions.IgnoreCase);
265265
_cmdletPassedIn.WriteDebug($"package file name pattern to be searched for is: {regexPattern}");
266266

0 commit comments

Comments
 (0)