import Foundation
var str = "Swift: is a high-level general-purpose, compiled ~!@#$%^&*() programm[i]ng language."
str = str.replacingOccurrences(of: "[\\p{Punct}]", with: "", options: .regularExpression)
print(str)
/*
run:
Swift is a highlevel generalpurpose compiled ~$^ programming language
*/