title: How to filter files by extensions using include parameter in Camel component File2
body: <p>I need the simplest filter by extension:
  f.e. file 20120523.173227.CustomerMaster05092012.QWERTY.xml
  route:</p>
  
  <pre><code>&lt;from uri="file://{{fdr.folder.working.url}}&amp;amp;include=*.xml"/&gt;
  </code></pre>
  
  <p>doesn't work:</p>
  
  <p>Dangling meta character '*' near index 0</p>
  
  <pre><code>WARN - file://root_folder/working/) [FileConsumer] Consumer Consumer[file://root_folder/working/?delay=1000&amp;delete=true&amp;idempotent=false&amp;include=*.xml&amp;initialDelay=1000&amp;readLock=changed] failed polling endpoint: Endpoint[file://root_folder/working/?delay=1000&amp;delete=true&amp;idempotent=false&amp;include=*.xml&amp;initialDelay=1000&amp;readLock=changed]. Will try again at next poll. Caused by: [java.util.regex.PatternSyntaxException - Dangling meta character '*' near index 0
  *.xml
  ^]
  java.util.regex.PatternSyntaxException: Dangling meta character '*' near index 0
  *.xml
  ^
      at java.util.regex.Pattern.error(Pattern.java:1713)
      at java.util.regex.Pattern.sequence(Pattern.java:1878)
      at java.util.regex.Pattern.expr(Pattern.java:1752)
      at java.util.regex.Pattern.compile(Pattern.java:1460)
      at java.util.regex.Pattern.&lt;init&gt;(Pattern.java:1133)
      at java.util.regex.Pattern.compile(Pattern.java:823)
      at java.util.regex.Pattern.matches(Pattern.java:928)
      at java.lang.String.matches(String.java:2090)
      at org.apache.camel.component.file.GenericFileConsumer.isMatched(GenericFileConsumer.java:458)
      at org.apache.camel.component.file.GenericFileConsumer.isValidFile(GenericFileConsumer.java:395)
      at org.apache.camel.component.file.FileConsumer.pollDirectory(FileConsumer.java:94)
      at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:107)
      at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142)
      at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>ok maybe my bad. I put whole file to include:</p>
  
  <pre><code>&lt;from uri="file://{{fdr.folder.working.url}}&amp;amp;include=20120523.173227.CustomerMaster05092012.QWERTY.xml"/&gt;
  </code></pre>
  
  <p>Whole file is OK. Let's try put * in the middle of file name</p>
  
  <pre><code>&lt;from uri="file://{{fdr.folder.working.url}}&amp;amp;include=20120523.*.xml"/&gt;
  </code></pre>
  
  <p>and again it is OK. Let's put only one digit in file name</p>
  
  <pre><code>&lt;from uri="file://{{fdr.folder.working.url}}&amp;amp;include=2*.xml"/&gt;
  </code></pre>
  
  <p>noup, camel didn't find such files
  I tried escaped asterisk but it did't help. </p>
  
  <pre><code>&lt;from uri="file://{{fdr.folder.working.url}}&amp;amp;include=\*.xml"/&gt;
  and
  &lt;from uri="file://{{fdr.folder.working.url}}&amp;amp;include=\\*.xml"/&gt;
  </code></pre>
  
  <p>File was just ignored.
  so question 1: how to use asterisk?</p>
  
  <p>and question 2: how to use multimple file extensions, like include=<em>.xml;</em>.zip</p>
  
  <p>thks</p>