Skip to content

Commit 549f700

Browse files
committed
Fix package name regex to account for 4 digit versions
1 parent de7732e commit 549f700

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+(?:-\w+|.\d)*.nupkg";
263+
string regexPattern = $"{packageName}" + @"\d+\.\d+\.\d+(?:-[a-zA-Z0-9]+)?.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)