I am attempting to refactor some old code, and want to replace [self.* release];
with self.* = nil;
where *
is some property name.
I am using a regular expression search like (\[self\.)(\w)+[\s](release\])
and for the replacement text I am using self.\2 = nil
. This all goes fine (180 results, yay) but when I preview (or perform the replace), the result only copies the开发者_StackOverflow last letter of the \w token.
For example, [self.property release];
would become self.y = nil;
. Anyone know what is up here?
Thanks
I know this is little bit old, but I wanted this and solved it like below
(\[self\.)(.*)( release\])
Try:
(\[self\.)(\w)*[\s](release\])
精彩评论