Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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";

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.

like image 264
Luke Avatar asked Jul 13 '12 13:07

Luke


1 Answers

Regular expression replace is still available in Xcode 4. Use "Replace" and set style to "Regular Expression", use "([^"]*)"; as pattern and replace with "BLAH";.

like image 57
Mattias Wadman Avatar answered Oct 21 '22 17:10

Mattias Wadman