title: Using $regex mongodb query in node js not working
body: <p><br/>
   From node js, i trying to retrieve the documents based on the keyword with case-insensitive. When i try directly from the mongo db console , i am able to see the result.</p>
  
  <pre><code>db.users.findOne({"displayName":{$regex: /.*abc./, $options:"i"}})
  </code></pre>
  
  <p>But when i try the same in node js, i am getting empty result.</p>
  
  <pre><code>var selector = { "displayName": {$regex: "/.*abc./", $options:"i"}}
  </code></pre>
  
  <p>is this due to regular expression not in javascript.<br/>Can anyone please help me in this.</p>