Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 6 doesn't recognize \1, \2, \# patterns anymore?

Tags:

regex

xcode

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

(regex)
   find: \[([a-zA-Z]+) ([a-zA-Z]+)\]
replace: \0.\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?

like image 797
Craig Gidney Avatar asked Oct 29 '14 16:10

Craig Gidney


People also ask

Why iPhone is not detected by Xcode?

The problem turned out to be that my version of xcode wasn't the most recent version, so it didn't have the SDK I needed to develop for 6.1. 3. Had this issue with Xcode 9.4. 1 and an iPhone 7 with iOS 11.4.

Which iOS version does Xcode 12.4 support?

Xcode 12.4 includes SDKs for iOS 14.4, iPadOS 14.4, tvOS 14.3, watchOS 7.2, and macOS Big Sur 11.1. The Xcode 12.4 release supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later. Xcode 12.4 requires a Mac running macOS 10.15. 4 or later.

What's the latest version of Xcode?

Xcode is Apple's integrated development environment (IDE) for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, and tvOS. It was initially released in late 2003; the latest stable release is version 14.0, released on September 12, 2022, via the Mac App Store with macOS Monterey.


1 Answers

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

(regex)
   find: \[([a-zA-Z]+) ([a-zA-Z]+)\]
replace: $0.$1
like image 200
Craig Gidney Avatar answered Sep 28 '22 07:09

Craig Gidney