Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

In Xcode 5 I could do search-and-replaces like this:

(regex)
   find: [([a-zA-Z]+) ([a-zA-Z]+)]
replace: .1

In order to switch from syntax like [ble bla] to ble.bla. But when I do these sorts of searches in Xcode 6, I now turn [ble bla] into 0.1.

How do I use groups from the find as part of the replace?

question from:https://stackoverflow.com/questions/26636170/xcode-6-doesnt-recognize-1-2-patterns-anymore

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
265 views
Welcome To Ask or Share your Answers For Others

1 Answer

Use $# instead of # to refer to the groups.

(regex)
   find: [([a-zA-Z]+) ([a-zA-Z]+)]
replace: $0.$1

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...