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!
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With