better ruby version subsitution regex