• 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: Mon, 10 Mar 2008 18:19:51 -1000

Here's a way to validate that it's ICU and not PCRE:

Do a regex find using the pattern: #\w+t

That will find a #import declaration.

Now, change the regex to: #[\w]+t

That doesn't work.

PCRE allows backslashed character classes to be used in a bracket set. ICU doesn't.

This question of what Xcode uses aside, I am curious though: I seem to be sensing the reason for the use of ICU is its support of Unicode. But doesn't PCRE support Unicode?

 

On Mar 10, 2008, at 23:48:26 -0400, Bill Royds wrote:

On 10-Mar-08, at 23:28 , Jerry Krinock wrote:


David, someone is lying to you.  Please try this.


From   http://www.pcre.org/pcre.txt   read:


"a backslash followed by a digit greater than 0 (and possibly  

further digits) is a back reference to a capturing sub- pattern"


From http://www.icu-project.org/userguide/regexp.html  read:


$n  The text of capture group n will be substituted for $n."



No, $1 etc. is also used in Perl  RE.  The \1 format refers to back  

references INSIDE the capture pattern, while the $1, $2 etc. refers to  

references in the substitution pattern to a capture group. Both are  

available in bot Perl and ICU.

ICU regular expressions ARE Perl regular expressions, From ICU page  

you reference:


ICU's Regular Expressions package provides applications with the  

ability to apply regular _expression_ matching to Unicode string data.  

The regular _expression_ patterns and behavior are based on Perl's  

regular expressions.


 _______________________________________________
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

  • Follow-Ups:
    • Re: Xcode Editor's Regex now uses PCRE instead of ICU?
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Re: Upgrade xcode 2.5 to use GCC 4.1
  • Next by Date: Re: Is or Is Not XCode 3.1 supposed to replace 3.0
  • Previous by thread: Re: Xcode Editor's Regex now uses PCRE instead of ICU?
  • Next by thread: Re: Xcode Editor's Regex now uses PCRE instead of ICU?
  • Index(es):
    • Date
    • Thread