title: mongo objectid 'contains' query
body: <p>I would like to query a collection in a MongoDB database to find all records that contain a portion of an ObjectID.  For a normal string I can use a regex like this:</p>
  
  <pre><code>db.teams.find({"some_string": /^51eed/})
  </code></pre>
  
  <p>But how would I do something similar on an ObjectID?</p>
  
  <p>Specifically, I have a collection that looks something like this:</p>
  
  <pre><code>{ "status" : 0, "_id" : ObjectId("51e97ff613e737801d000002") }
  { "status" : 0, "_id" : ObjectId("51ee7513d1f7c57420000002") }
  { "status" : 0, "_id" : ObjectId("51eed9dd5b605af404000002") }
  { "status" : 0, "_id" : ObjectId("51eedab39108d8101c000002") }
  </code></pre>
  
  <p>I would like to query (in mongo) for all records where the ObjectId starts with "51eed".  Your help is greatly appreciated.</p>