The rcX -> X conversion is already done by the code above. There would be just 4 forms of the version (rc, final, respin, stable) so a function can be written to perform the conversions.