I modified the RE from the last one I saw you post ($version =~ m/\s([\d\.]+\w?)/m;) to allow for multiple digit fields, to remove the "m" modifier ($ is gone now), and to only allow digits in the last field of the version number.

I don't know all the contortions of version strings you are trying to match, i.e., why you allowed any alphanumeric (including _) for the last field. This one will match all digits with an optional single letter suffix at the end (i.e., must be at a word boundary).