Search
 
SCRIPT & CODE EXAMPLE
 

SWIFT

swift email regex

func isValidEmail(_ email: String) -> Bool {        
    let emailRegEx = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,64}"

    let emailPred = NSPredicate(format:"SELF MATCHES %@", emailRegEx)
    return emailPred.evaluate(with: email)
}
Comment

PREVIOUS NEXT
Code Example
Swift :: for each swiftui 
Swift :: swiftui steppers 
Swift :: replace character in swift 
Swift :: swift button 
Swift :: rotate image animated swift 
Swift :: index string swift 
Swift :: How to set back button text in Swift 
Swift :: and in swif 
Swift :: change the title of a button using Swift 
Swift :: set button programmatically swift 
Swift :: swift find difference between two arrays 
Swift :: swift alert toast 
Swift :: Swift Swift continue statement with nested loops 
Swift :: rxswift combine two observables 
Swift :: swift create custom button programmatically 
Swift :: swift scrollview auto fit content height 
Swift :: swift programmatically set font 
Swift :: add callbacks to view swiftui 
Swift :: how to set return type swift 
Swift :: Swift Class and Objects 
Swift :: swift enum xib 
Swift :: swift firebase realtime db class 
Swift :: swift array in chunks 
Swift :: Swift Change Value of Dictionary 
Swift :: Swift Named Tuple 
Swift :: Button on right side/view of UITextField 
Swift :: Swift Escape Sequences 
Swift :: Swift Loop Statements 
Swift :: Function Call Using try Keyword Swift 
Swift :: swift loop site:stackoverflow.com 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =