My objective is to get the version number from a string where the string may contain anything. Here's my example data set:
Version 1.32.0.1
Version 1.32.0.1c
Version 1.32.1
Version 1.33.2e
Version 1.32
I've attempted to match that with this regex (\d+\.\d+(?:\.\d+)?)(\w?) but I can't seem to figure out why this won't match the 4th decimal value, even with the descriptive breakdown provided by regex101.com.
What am I misunderstanding about this regex causing it to not match all version variations?
string version = Regex(str_version, @"Version\s+(?'ver'.+)").Groups["ver"].Value;