Is there a guide to using regular expressions in objective c?
Specifically what to type into the “Reg. Ex.” field in a core data property?
In particular, how to limit input to a set amount of numbers/letters only, and for UK Post Codes?
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to the Apple documentation, the NSPredicate regex support implements the ICU package, so check their pages for documentation:
ICU Regex Documentation
For example, a regular expression of [0-9a-zA-Z]{5} could be used match on exactly 5 numbers or letters. (So would the shorter form of [\w\d]{5} though that also permits a few other characters)