Regex to parse package name and version number from nuget package filenames
I modified your expression slightly to:
^(.*?)\.((?:\.?[0-9]+){3,}(?:[-a-z]+)?)\.nupkg$
The main points are that I moved the .
in front of the digits in the first non capturing group, and that I added an optional non capturing group for -alpha
in the fourth string.
Replace with:
Package: \1 Version: \2
Test the regex live here.