标签:for test 密码 func pwd round ace 组成 ret
class func isPassword(pasword : String) -> Bool {
let pwd = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$"
let regextestpwd = NSPredicate(format: "SELF MATCHES %@",pwd)
if (regextestpwd.evaluate(with: pasword) == true) {
return true
}else{
return false
}
}
标签:for test 密码 func pwd round ace 组成 ret
原文地址:http://www.cnblogs.com/qizhuo/p/7904262.html