Simpler, more robust regex for gem version detection