How to use regular expressions in XCode Find/Replace
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