4

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)?

pkamb
  • 33,281
  • 23
  • 160
  • 191
Nick
  • 2,803
  • 1
  • 39
  • 59

1 Answers1

10

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

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

Check out this very good explanation here: stackoverflow

Community
  • 1
  • 1
Miguel
  • 295
  • 2
  • 10
  • I have a 260MB text file in my workspace that slows searching down tremendously. Now I can ignore it while searching! Thanks. – TPoschel Oct 01 '12 at 00:35