title: Performing regex queries with PyMongo
body: <p>I am trying to perform a regex query using PyMongo against a MongoDB server. The document structure is as follows</p>
  <pre><code>{
    &quot;files&quot;: [
      &quot;File 1&quot;,
      &quot;File 2&quot;,
      &quot;File 3&quot;,
      &quot;File 4&quot;
    ],
    &quot;rootFolder&quot;: &quot;/Location/Of/Files&quot;
  }
  </code></pre>
  <p>I want to get all the files that match the pattern *File. I tried doing this as such</p>
  <pre><code>db.collectionName.find({'files':'/^File/'})
  </code></pre>
  <p>Yet I get nothing back. Am I missing something, because according to the MongoDB docs this should be possible? If I perform the query in the Mongo console it works fine, does this mean the API doesn't support it or am I just using it incorrectly?</p>