• 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
NSPredicate Matches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPredicate Matches


  • Subject: NSPredicate Matches
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Thu, 17 Dec 2009 12:18:09 +0700

I have a Core Date entity A which has a to-many ralationship called theBs.
And a Core Date entity B which has a to-many ralationship called theCs.
And a final Core Date entity C which has an NSString attribute called someString.

I tried to find all A entities which contain "xyz" by using an NSPredicate: "ANY theBs.theCs.someString MATCHES ".*xyz.*" "

But all I got was an error message:
Can't do regex matching on object [description of an NSSet with all the someStrings connected to the first A entity].

When I change the predicate to: "ANY theBs.theCs.someString CONTAINS  "xyz" " it kind of works, but for xyz = "change the" I get no finds, whereas for xyz = "change the price" the predicate finds one entity (correct), and for xyz = "change the p" it finds nothing again.

So CONTAINS is not really usable for me.

Any insight would be much appreciated.

Kind regards,

Gerriet.

_______________________________________________

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

  • Follow-Ups:
    • Re: NSPredicate Matches
      • From: Keary Suska <email@hidden>
  • Prev by Date: Command+Option+Return not sent to doCommandBySelector:
  • Next by Date: Re: App works when launched from Xcode, not from Finder
  • Previous by thread: Re: Command+Option+Return not sent to doCommandBySelector:
  • Next by thread: Re: NSPredicate Matches
  • Index(es):
    • Date
    • Thread