📌  相关文章
📜  检查字符串python代码示例中是否有特殊字符

📅  最后修改于: 2022-03-11 14:45:12.623000             🧑  作者: Mango

代码示例1
string = "Daneshwar$/?$Daneshwar"
regex = re.compile('[@_!#$%^&*()<>?/\|}{~:]')
if(regex.search(string) == None):
    print("special is absent")
else:
    print("present")