• 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 3.2.1: Regular expression replace is not expanding $1, $2, etc.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 3.2.1: Regular expression replace is not expanding $1, $2, etc.


  • Subject: Re: Xcode 3.2.1: Regular expression replace is not expanding $1, $2, etc.
  • From: Dave Carrigan <email@hidden>
  • Date: Fri, 9 Oct 2009 13:53:48 -0700


On Oct 9, 2009, at 1:37 PM, Chris Espinosa wrote:


On Oct 9, 2009, at 1:24 PM, Dave Carrigan wrote:

If my find pattern is foo(.*) and my replace pattern is baz$1, I would expect foobar to get turned into bazbar but instead it's getting turned into baz$1. Regular expression search option is obviously on or it wouldn't be finding foobar at all.

Am I missing something? And if I'm not missing something, should I file a bug report?

The regex library that Xcode uses implements \n-style replacement patterns, not $n.

Ok. It seems that it's documentation bug, because the Xcode docs say "Xcode uses the ICU library for regular expression matching (see http://icu-project.org/userguide )", and their pages say to use $n.


--
Dave Carrigan
email@hidden
Seattle, WA, USA

_______________________________________________
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: 
 >Xcode 3.2.1: Regular expression replace is not expanding $1, $2, etc. (From: Dave Carrigan <email@hidden>)
 >Re: Xcode 3.2.1: Regular expression replace is not expanding $1, $2, etc. (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: Xcode 3.2.1: Regular expression replace is not expanding $1, $2, etc.
  • Next by Date: Re: OCUnit assertion failures not showing up in text editor
  • Previous by thread: Re: Xcode 3.2.1: Regular expression replace is not expanding $1, $2, etc.
  • Next by thread: linking on OSX
  • Index(es):
    • Date
    • Thread