Xcode: Searching with Regex

I’m asked about this on a surprisingly regular basis and Xcode keeps changing the way it handles things. Here’s the scoop for the latest version of Xcode 7 Beta:

1. The search-bar’s Find Options are found under the pop-up from the magnifying glass at the left.

Screen Shot 2015-07-27 at 12.15.13 PM

2. Choose Regex or Text from the Matching Style pop-up.

XcodeScreenSnapz001

3. The prompt text updates to show your current match style, in this case Regex. Options at the bottom also enable you to match case (leave unchecked for case insensitive searches) and wrap searches.

Screen Shot 2015-07-27 at 12.06.22 PM

4. When doing text searches, you can specialize for contains, starts-with, matches, and ends-with.

XcodeScreenSnapz002

One Comment

  • Wow, very helpful info, thank you!