More than 1 year has passed since last update.


    /// その文字列がメールアドレスかどうか調べる
    class func isValidEmail(string: String) -> Bool {
        println("validate calendar: \(string)")
        let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"
        var emailTest = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
        let result = emailTest?.evaluateWithObject(string)
        return result!


Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account log in.