NSPredicate Matches
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