How to create a NSPredicate to find entries with leading numerical value?

Posted by Toastor on Stack Overflow See other posts from Stack Overflow or by Toastor
Published on 2010-12-22T12:51:51Z Indexed on 2010/12/22 12:54 UTC
Read the original article Hit count: 114

Hello,

I'm using NSPredicates to fetch entities based on a name attribute. Creating a predicate for names beginning with letters was easy (@"name BEGINSWITH %@", searchLetter), however now I'd like to fetch all entities with a name that begins with a numerical value, or rather a non-alphabetical number.

What would be the appropriate predicate expression here?

Right now I don't want to get too deep into predicate programming, as this is all I need right now and time flies. So, please, don't point me to the Predicate Programming Guide, I just need that expression.. :)

Thanks alot guys!

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c