Extract version numbers from filenames.