正则替换正则提取 正则替换pattern = '\s'str = "123 sdfsdf"re.sub(pattern,'',str) 正则提取re_parttern = r'[vV]\.?([0-9\.]*)'file_name_versions = re.findall(re_parttern, title) # 获取数组