Re: Regular Expressions?
Subject : Re: Regular Expressions?
From: David Troy <email@hidden >
Date: Fri, 6 Jun 2008 04:01:38 -0400
Delivered-to: email@hidden
Delivered-to: email@hidden
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer:sender; bh=AH/NiENI8J+jaZu8g5MCm5uVXWVk4R2bRUY8waBj0CE=; b=GS0HeFRdsFzreWYEoVTds+49GQzTXYTU2JwrxjTdXBDCpiDWFky+CCxX+yK/H6gwri 8NVjFzBDmFLPM8bGeZ7WdOyjtjRaEp7Bthe/W7H/BrTqFMTIyUkpAtnrz6/p/EODjaII udeXDnwINJd6U+8dFGeP5njsjj8l9rphGVohw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer:sender; b=cuR111zWU42Mf+CIcA9L42p9DC/0mhhkREGPGjWbazmEbJnuktZNH5Ph/Zy8NJioOW nlcye4h32jz4b8T7QYMb5hHP4JDu1M7ciYKKojxMddVk/BRtJaWV3jwCLl6I74On9xeR jOkcSGKjmFRI9nqR2iINmmoTW3ntFgzuHVjrM=
Depending on what you're doing you could try using Ruby Cocoa.
In theory this should give you access to all of Ruby's internal regexp
support, combined with the GUI goodness of Cocoa. However, this has
limitations of its own, such as distribution audience, speed, etc.
Dave
On Jun 6, 2008, at 3:55 AM, Bob Warwick wrote:
On 6-Jun-08, at 4:31 AM, Cemil Browne wrote:
Hi all,
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?
I can't find anything and I've found some third-party frameworks -
but
surely something so necessary must be buried in the string classes
somewhere? How would I do a simple substring search or replace in
10.4?
Thanks,
Cemil
Hello -
There is no regular expression support in Cocoa. You might find http://www.cocoadev.com/index.pl?RegularExpressions
useful in helping to find a library to do it for you.
Search and replace in Cocoa looks like this:
NSString *someString = @"The quick brown fox";
NSString *newString = [someString
stringByReplacingOccurrencesOfString:@"quick" withString:@"slow"];
You can find this in the NSString documentation. It creates a new
string with the substring replaced.
-Bob Warwick
email@hidden
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden
This email sent to email@hidden
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.