import
re
def
validateTitle(title):
rstr
=
r
"[\/\\\:\*\?\"\<\>\|]"
# ‘/ \ : * ? " < > |‘
new_title
=
re.sub(rstr,
"_"
, title)
# 替换为下划线
return
new_title
原文地址:https://www.cnblogs.com/php-linux/p/8318286.html
时间: 2024-10-03 05:56:09