9394952

导航

python中关于windows文件名非法字符的过滤处理

参考文章:http://www.cppcns.com/jiaoben/python/261979.html

import re

new_filename=re.sub(r'[\\/:*?"<>|\r\n]+', "_", old_filename)

 

posted on 2020-12-03 10:30  9394952  阅读(953)  评论(0编辑  收藏  举报