• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Error validating email addresses in Core Data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error validating email addresses in Core Data


  • Subject: Re: Error validating email addresses in Core Data
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 15 Apr 2011 08:17:35 -0700

On Apr 15, 2011, at 6:30 AM, Michael Crawford <email@hidden> wrote:

> I'm trying to validate email addresses in Core Data but the regular expression I'm using doesn't seem to work even though it looks correct.  I'm using the following expression:
>
> ^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$
>

You cannot validate emails using a regular expression. They cannot describe all valid email addresses.

Even as a basic sanity check, your regexp is incorrect. It fails to allow for plus signs, for example, thus prohibiting use of Gmail's plus-addressing feature, which sends all mail addressed to email@hidden to email@hidden.

--Kyle Sluder_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Error validating email addresses in Core Data (From: Michael Crawford <email@hidden>)

  • Prev by Date: Re: Error validating email addresses in Core Data
  • Next by Date: dealing with alias files, finding URL to target file
  • Previous by thread: Re: Error validating email addresses in Core Data
  • Next by thread: Re: Error validating email addresses in Core Data
  • Index(es):
    • Date
    • Thread