peekaboo, icu
-
Various parts of Cocoa use ICU to do regular expression searching, so it
must be built in; so is there a way I can just use it directly to do a find
or find-and-replace in an NSString? Thx - m.
--
matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119> -
On 14 jul 2006, at 19.46, Matt Neuburg wrote:
> Various parts of Cocoa use ICU to do regular expression searching,
> so it
> must be built in; so is there a way I can just use it directly to
> do a find
> or find-and-replace in an NSString? Thx - m.
I failed in my attempt to use the ICU library that ships with Mac OS
X: /usr/lib/libicucore.dylib.
It's quite possible that you could make it work even if I couldn't...
There are a bunch of Cocoa regexp facilities available:
OgreKit
AGRexex
MOKit
OFRegularExpression
NSPredicate
You will most likely find one that can provide the functionality
you're looking for.
I didn't find any of them to my liking (various combinations of
problems: not universal, inadequate performance or awkward API), and
so made my own wrapper for PCRE. It's very bare-bones, but you can
have a copy of it if you would want to attempt to extend it.
j o a r -
The regular expression facility in ICU is not currently exposed to
developers for general usage with NSString. If you'd like to see such
a facility, the best thing to do is file a bug.
Deborah Goldsmith
Internationalization, Unicode liaison
Apple Computer, Inc.
<goldsmit...>
On Jul 14, 2006, at 10:46 AM, Matt Neuburg wrote:
> Various parts of Cocoa use ICU to do regular expression searching,
> so it
> must be built in; so is there a way I can just use it directly to
> do a find
> or find-and-replace in an NSString? Thx - m.
> --
> matt neuburg, phd = <matt...>, <http://www.tidbits.com/matt/>
> A fool + a tool + an autorelease pool = cool!
> AppleScript: the Definitive Guide - Second Edition!
> <http://www.amazon.com/gp/product/0596102119>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (<Cocoa-dev...>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<goldsmit...>
>
> This email sent to <goldsmit...>
-
On or about 7/14/06 5:10 PM, thus spake "Deborah Goldsmith"
<goldsmit...>:
> The regular expression facility in ICU is not currently exposed to
> developers for general usage with NSString. If you'd like to see such
> a facility, the best thing to do is file a bug.
Well, it's "bug report Friday" anyway, so I guess I'll just have to...! :)
Filed as radar ID 4631933. Thx - m.
> On Jul 14, 2006, at 10:46 AM, Matt Neuburg wrote:
>
>> Various parts of Cocoa use ICU to do regular expression searching,
>> so it
>> must be built in; so is there a way I can just use it directly to
>> do a find
>> or find-and-replace in an NSString? Thx - m.
--
matt neuburg, phd = <matt...>, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide - Second Edition!
http://www.amazon.com/gp/product/0596102119
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/



