title: Exclude dependency jars in gradle using regular expression syntax
body: <p>I can include jars from a folder in gradle script using below code:</p>
  
  <pre><code>compile fileTree(dir: 'libs', include: '*.jar')// libs -&gt; folder in root directory
  </code></pre>
  
  <p>I can exclude a jar from a folder in gradle script using below code:</p>
  
  <pre><code>compile fileTree(dir: 'libs', include: '*.jar', exclude: 'antlr-2.7.7.jar')
  </code></pre>
  
  <p>I can exclude multiple jars using below code:</p>
  
  <pre><code>compile fileTree(dir: 'libs', include: '*.jar', exclude: ['antlr-2.7.7.jar', 'antlr-runtime-3.3.jar'])
  </code></pre>
  
  <p>But I could not exclude jars using regular expression way, like this:</p>
  
  <pre><code>compile fileTree(dir: 'libs', include: '*.jar', exclude: 'antlr-.*.jar')
  </code></pre>
  
  <p>The above line wouldn't give any error but it will not exclude the two antlr jars. Is it possible to achieve this in gradle.</p>
  
  <p>Thank you in advance.</p>