• 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
How to use regular expressions in XCode Find/Replace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use regular expressions in XCode Find/Replace


  • Subject: How to use regular expressions in XCode Find/Replace
  • From: Paul Summermatter <email@hidden>
  • Date: Tue, 11 Aug 2009 12:51:10 -0400

Folks,

I'm trying to use the File specific find/replace feature to replace some text using Regex.  Now, I'm now regex expert, but I'm trying to do something which works in another IDE.  Basically, I'm trying to transform a bunch of code that looks like:

@synthesize UIView *aView;

into

@synthesize aView = _aView;

My regex find is 

\@synthesize\ .*\*(.*)\;

My replacement is:

@synthesize $1 = _$1\;

Either I'm doing something wrong or XCode doesn't recognize the $1 replacement parameter, because I end up with @synthesize $1 = _$1;  Note that I copied and pasted this code into my other IDE and ran the same Regex find/replace, and it did what I wanted.  That certainly doesn't mean XCode does it the same way, but I would appreciate any advice on how to get this to work, because I use this feature quite a lot.

Regards,
Paul
 _______________________________________________
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: How to use regular expressions in XCode Find/Replace
      • From: Fritz Anderson <email@hidden>
  • Prev by Date: DWARF file size with Xcode 3.1.2 and Xcode 3.1.3 is different
  • Next by Date: Re: How to use regular expressions in XCode Find/Replace
  • Previous by thread: DWARF file size with Xcode 3.1.2 and Xcode 3.1.3 is different
  • Next by thread: Re: How to use regular expressions in XCode Find/Replace
  • Index(es):
    • Date
    • Thread