title: ack: Exclude specific directories from search via regex
body: <p>How do I ignore specific directories via RegEx with <a href="http://betterthangrep.com/" rel="noreferrer">ack</a>?</p>
  
  <p>I can use the <code>--ignore-dir</code> option, but this does not let me specify a RegEx. I want to be able to ignore any directory, which has the words <code>test</code> or <code>tests</code> or more complicated patterns in its name.</p>
  
  <p>I also tried a negative lookbehind via</p>
  
  <pre><code>ack -G '(?&lt;!test)' pattern
  </code></pre>
  
  <p>but this does not work. It does not exclude the <code>test</code> directories.</p>