Switch to using regex for extracting version info.