我试图重构一些旧的代码,并且想用self.* = nil;
代替[self.* release];
,其中*
是某些属性名称。xcode定期搜索/替换错误?
我正在使用正则表达式搜索,如(\[self\.)(\w)+[\s](release\])
和我正在使用的替换文本self.\2 = nil
。这一切都很顺利(180结果,耶),但是当我预览(或执行替换),结果只复制\ w标记的最后一个字母。例如,[self.property release];
将变成self.y = nil;
。任何人都知道这里是什么?
感谢
当我看到正则表达式的文档,我总觉得[this](http://thejoysofcode.tumblr.com/post/35331265331/when-i-am-forced-to-read-regex-documentation)... –