Re: Regular Expressions?
Re: Regular Expressions?
- Subject: Re: Regular Expressions?
- From: "Hamish Allan" <email@hidden>
- Date: Fri, 6 Jun 2008 10:08:45 +0100
On Fri, Jun 6, 2008 at 8:31 AM, Cemil Browne <email@hidden> wrote:
> This might be a really silly question - but am I missing something obvious?
> Is there any support at all for regular expressions in the Cocoa libraries?
You can use NSPredicate for regexp matching, though no substitution is possible:
NSPredicate *pred = [NSPredicate predicateWithFormat:@"self matches
%@", yourRegexp];
BOOL result = [pred evaluateWithObject:yourString];
Hamish
_______________________________________________
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