[Solution found!] re.sub(r'(?:_a)?\.([^.]*)$', r'_suff.\1', "long.file.name.jpg") ?:启动一个不匹配的组(SO答案),所以(?:_a)匹配_a而不是枚举它,以下问号使其 ...
確定! 回上一頁