I want to a regex which excludes consective dot characters and excludes dot(.) in start and end of email.
Here is snippet
let emailRegEx = "[^.][A-Z0-9a-z_%+-.]+[^.]@[A-Za-z0-9-]+\\.[A-Za-z]{3,10}"
let emailPredicate = NSPredicate(format: "SELF MATCHES %@", emailRegEx)
return emailPredicate.evaluateWithObject(emailString)
I acheieved 2nd part. Can some one help me with regex to exclude consecutive dot (.) characters in the email before @?.
Thanks