查找 &在 Xcode 4 中用通配符替换 [英] Find & Replace with a wildcard in Xcode 4
问题描述
我试图找到"标记内的所有文本实例,并在它们之后直接使用分号,并替换"标记内的文本.因此,例如:
I'm trying to find all instances of text inside "" marks with a semi-colon directly after them, and replace the text inside the "" marks. So, for example:
"FirstKey" = "First value";
"SecondKey" = "Second value";
"ThirdKey" = "Third value";
只会在等号之后找到那些值,并且可以一次替换它们(用单个字符串),如下所示:
Would find only those values after the equals signs, and could replace them all (with a single string) at once, like so:
"FirstKey" = "BLAH";
"SecondKey" = "BLAH";
"ThirdKey" = "BLAH";
我该怎么做?我在 Xcode 3 中发现了一些与正则表达式相关的内容,但这些功能在 Xcode 4 中似乎已经消失或隐藏了.
How can I do this? I found some stuff referring to regular expressions in Xcode 3, but such functionality seems either gone or hidden in Xcode 4.
推荐答案
正则表达式替换在 Xcode 4 中仍然可用.使用替换"并将样式设置为正则表达式",使用 "([^"]*)";
作为模式并替换为 "BLAH";
.
Regular expression replace is still available in Xcode 4. Use "Replace" and set style to "Regular Expression", use "([^"]*)";
as pattern and replace with "BLAH";
.
这篇关于查找 &在 Xcode 4 中用通配符替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!