On 2008 Mar, 07, at 15:23, David Ewing wrote:
Nope. We Use ICU, and that hasn't changed. I can't speak to the documentation, but the caret operator has been standard in Regex's for decades.
David, someone is lying to you. Please try this.
"a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing sub- pattern"
$n The text of capture group n will be substituted for $n."
So, we have here a clear nonambiguous difference between PCRE and ICU. PCRE uses \n to reference capture groups and ICU uses $n.
Now, let's see which Xcode uses. Open a text file that has a "#import" statement near the beginning. We're going to try and change #import to #important
Click ⌘F to get Single File Find. In the "Find:" field, enter: (import) In the "Replace" field, enter: \1ant Click "Next" and then "Replace". Result: #import gets changed to #important. Conclusion: It worked. It's PCRE.
Now, in "Replace", change to: $1ant Scroll to top ot file, click "Next" and "Replace" again. Result: #import gets changed to #$1ant Conclusion: It didn't work. It ain't ICU.
This is the clearest example, but there are others, like the one I wrote about in this thread last week. Whenever there is a conflict between ICU and PCRE documentation, the PCRE documentation is the one that works in Xcode. I've already filed a bug on this a few weeks ago, but I'm just re-posting here to set the record straight. Maybe one of your Perl fans in Cupertino slipped the PCRE library in place of ICU while no one was looking?
Jerry Krinock |