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

1 Answer 1

10

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

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

Check out this very good explanation here: stackoverflow

1
  • I have a 260MB text file in my workspace that slows searching down tremendously. Now I can ignore it while searching! Thanks.
    – TPoschel
    Commented Oct 1, 2012 at 0:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.