title: MongoDB like Operations in Java
body: <p>i have a field in mongodb in which documents starts with words like 1.1. , 2.0. , 2.1., 3.0.,3.1 etc. but i need to query documents that start with some specific string like 1.1.or 2.0. etc. i don't care what ever after this 1.1. or 2.0. or.
  i tried the query like this</p>
  
  <pre><code>BasicDBObject whereQuerylevel = new BasicDBObject();
  whereQuerylevel.put("level",new BasicDBObject("$regex", "^1.1."));
  myCollection.find(whereQuerylevel);
  </code></pre>
  
  <p>how do i get documents in a field which start with 1.1. or 2.0. something like that in mongodb?</p>