in reply to Need version regex

In perl regexes, you can place comments inside (?# ... ); I'd place your original version there; should be easy to extract again from the stringized qr//. As for all the rest, you need to specify what forms version numbers can take and what "higher" and "lower" mean. I'm guessing maybe you want versions to be strings of digits separated by strings of non-digits, and to apply a few rules:

A series of strings of digits is greater than another series of strings of digits if the series starts with 0 or more strings of digits numerically equal to the corresponding ones followed by a string of digits that is numerically greater than the corresponding one.

A version is higher if the leading series of strings of digits that has separating non-digits equal to the corresponding ones is greater than the corresponding series.

A versions is equal if its strings of digits are all numerically equal and strings of non-digits are equal to the corresponding ones.

I leave to you or others coming up with a regex.