title: Crashplan and regex - excluding files based on filename
body: <p>Crashplan allows for excluding files from a backup set by using regex for the exclusion criteria (there is no inclusion criteria functionality). For my particular use case I have a folder that contains these files:</p>
  
  <pre><code>C_VOL-b001.spf
  C_VOL-b001-i001.md5
  C_VOL-b001-i001.spi
  E_VOL-b001.spf
  E_VOL-b001-i001.md5
  E_VOL-b001-i001.spi
  F_VOL-b001.spf
  F_VOL-b001-i001.md5
  F_VOL-b001-i001.spi
  G_VOL-b001.spf
  G_VOL-b001-i001.md5
  G_VOL-b001-i001.spi
  </code></pre>
  
  <p>and I want to exclude any file that doesn't begin with the C_VOL filename. These are backup files from another backup software, Shadowprotect, but I only want to include the C volume files and exclude the others. The incremental files will continue to be added to each of the volume sets using the naming schema of -i001, -i002, etc.</p>
  
  <p>So far I've tried the following:</p>
  
  <pre><code>^E_VOL
  ^E_VOL.*
  </code></pre>
  
  <p>and a few other variations, with no success. I'm not sure if Crashplan only allows for selecting based on the filetype extension (their regex examples are here <a href="http://goo.gl/qDAEcR" rel="nofollow">http://goo.gl/qDAEcR</a> ). They do mention that "Note that CrashPlan treats all file separators as forward slashes (/)."</p>
  
  <p>I'm not sure if Crashplan recognizes all regex expressions. If it helps, back in 2008 I emailed their tech support with a regex question and one of the founders of Crashplan, Matt Dornquast, helped me with a the following regex:</p>
  
  <p>I am trying to exclude any file that either:</p>
  
  <pre><code>1.       have an extension of .spf, or
  2.       has a file name of the type, XXXXXX-cd.spi
  3.       But also allow for backup of files with the name type of, xxxxx.spi
  </code></pre>
  
  <p>And his regex worked perfectly:</p>
  
  <pre><code>(?i).+(?:\-cd\.spi|\.spf)$
  </code></pre>
  
  <p>I've contacted their tech support again but they said they will no longer help with regex questions.</p>