• 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
Core Data and Regular Expressions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data and Regular Expressions


  • Subject: Core Data and Regular Expressions
  • From: Jeff LaMarche <email@hidden>
  • Date: Thu, 9 Jun 2005 20:30:55 -0400

I've got a string attribute in an Entity using Core Data. I'm trying to validate the string attribute using a regular expression. I've typed the following regular expression into the Reg. Ex. field in the data model editor:

\d{9}[\dXx]

which is intended to validate an ISBN number, which is ten digits, the first nine of which are numbers, the last one can be either a number or the letter X. If I do this, it allows a ten digit number, but does not allow the X or x at the end. If I switch it to:

\d{9}[Xx\d]

then it allows the X in the tenth character, but disallows numbers. It looks like it's not respecting the brackets set, but only allowing the first character in the set.

Does anyone know what might be causing this? Does Core Data use some non-standard version of regular expression syntax, or do I need to escape something here? Any help would be greatly appreciated.

Thanks,
Jeff


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: Carbon to Cocoa migration
  • Next by Date: Multiple notification calls?
  • Previous by thread: Re: LSBackgroundOnly App launches, then quits if other user at console
  • Next by thread: Multiple notification calls?
  • Index(es):
    • Date
    • Thread