Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode: How to exclude a path from Search Navigator

In Xcode, in this case 4.x, how would you go about excluding a path (or a path containing a pattern) from search results?

My use case:

My project is SVN controlled. Whenever I search for text (such as a function name), I often get irrelevant results returned from ".svn-base" files (which are used for making local diff's between your working copy and the last checked out revision).

I have setup a custom scope where the 'Location' 'is within the file or folder' 'Classes' (a subfolder I want to search). There doesn't seem to be a way to say "And Not..." or "And where path does not match". There is a "matches regex" and I feel the answer may lie around Look-arounds... Maybe something like (?!\.svn)?

like image 646
Nick Avatar asked Dec 28 '22 04:12

Nick


1 Answers

In an extra condition in the settings of my custom scopes I use this:

^((?!\.svn).)*$

Check out this very good explanation here: stackoverflow

like image 85
Miguel Avatar answered Jan 07 '23 20:01

Miguel