title: Regex for Mongo db from node.js is not working
body: <p>I am using regex to fetch data from mongodb from my node js application which is not working. Here is the code snippet. the query can not match with the set of records.</p>
  
  <pre><code>var analysis_date = '/^'+moment(fromTime).format('YYYY-MM').toString()+'/';
  user_analysis.find({
  parent_id: usrId,
  analysis_date: { 
      $regex : analysis_date 
     }
  },function(err, result) {
  //some Code goes here});
  </code></pre>