• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode Editor's Regex now uses PCRE instead of ICU?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode Editor's Regex now uses PCRE instead of ICU?


  • Subject: Re: Xcode Editor's Regex now uses PCRE instead of ICU?
  • From: Stuart Malin <email@hidden>
  • Date: Thu, 13 Mar 2008 08:50:15 -1000

Yowza -- seems like a lot of ambiguity.

With a preponderance of UTF-8, I'd be biased to use PCRE. But if those strings are being re-encoded as UTF-16, then ICU seems a better choice, especially if non-ASCII word breaking is needed. Then someone mentioned (sorry, I lost track of who) OniGuruma, which I now learn is used by Ruby (no surprise there), PHP, and TextMate.

Wouldn't it be nice if Apple solved the dilemma and gave us an NSRegularExpression class? (rhetorical)

In lieu of that, does anyone have guidance about a best practice for using regex in Cocoa apps?

Regarding OniGuruma, I did also discover OgreKit, a framework for Cocoa. But the site for that is in Japanese:
http://www8.ocn.ne.jp/~sonoisa/OgreKit/index.html
I'm having difficulty finding some English documentation -- does anyone know of any?
Or should I just download, build, and start reading headers?



On Mar 12, 2008, at 9:37 PM, Clark Cox wrote:

On Wed, Mar 12, 2008 at 5:40 PM, Alastair Houghton
<email@hidden> wrote:
On 12 Mar 2008, at 23:01, John Engelhart wrote:

Since my observed behavior of CFString / NSString is that it tries
to avoid converting the strings buffer it was initialized with if
possible.

Yes, that's true. You can see the sources for CFString in the Darwin
source tree. Furthermore, string constants (even @"" and CFSTR("")
ones) are encoded in ASCII by the compiler, which makes 8-bit strings
quite common in practice.

FYI: As of Leopard, this is no longer necessarily true (i.e. the string constants being ASCII). Full UTF-8 strings are now supported within @"" and CFSTR("") strings, so there are cases where even these strings are encoded as UTF-16 by the compiler.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Xcode Editor's Regex now uses PCRE instead of ICU? (From: Stuart Malin <email@hidden>)
 >Re: Xcode Editor's Regex now uses PCRE instead of ICU? (From: Alastair Houghton <email@hidden>)
 >Re: Xcode Editor's Regex now uses PCRE instead of ICU? (From: John Engelhart <email@hidden>)
 >Re: Xcode Editor's Regex now uses PCRE instead of ICU? (From: Alastair Houghton <email@hidden>)
 >Re: Xcode Editor's Regex now uses PCRE instead of ICU? (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: CFBundleGetFunctionPointerForName
  • Next by Date: Re: CFBundleGetFunctionPointerForName
  • Previous by thread: Re: Xcode Editor's Regex now uses PCRE instead of ICU?
  • Next by thread: Can't macro expand source code project template files
  • Index(es):
    • Date
    • Thread