Core Data and Regular Expressions
Core Data and Regular Expressions
- Subject: Core Data and Regular Expressions
- From: Jeff LaMarche <email@hidden>
- Date: Thu, 9 Jun 2005 20:30:55 -0400
I've got a string attribute in an Entity using Core Data. I'm trying
to validate the string attribute using a regular expression. I've
typed the following regular expression into the Reg. Ex. field in the
data model editor:
\d{9}[\dXx]
which is intended to validate an ISBN number, which is ten digits,
the first nine of which are numbers, the last one can be either a
number or the letter X. If I do this, it allows a ten digit number,
but does not allow the X or x at the end. If I switch it to:
\d{9}[Xx\d]
then it allows the X in the tenth character, but disallows numbers.
It looks like it's not respecting the brackets set, but only allowing
the first character in the set.
Does anyone know what might be causing this? Does Core Data use some
non-standard version of regular expression syntax, or do I need to
escape something here? Any help would be greatly appreciated.
Thanks,
Jeff
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden