title: Does the dollar sign, when used in a string, mean anything special regarding arrays?
body: <p>Given this mongoose query, what does the dollar sign mean here?</p>
  
  <pre><code>customers.findOne({'name':data.tenant,'scripts.name':data.name},{'scripts.$':1},function(err,data2){
  </code></pre>
  
  <p>This ends up returning one element of the <code>scripts</code> array.</p>
  
  <p>the dollar sign below work in the same way?</p>
  
  <pre><code>var newStr =  loc.replace(/(.*\/)[^/]+(\/[^\/]*)$/,'$1'+data.name+'$2');
  </code></pre>
  
  <p><code>$1</code> and <code>$2</code> are the first and second elements of the array.</p>
  
  <p>Does the <code>$</code> character, when used in a string, mean something special for arrays, indexes, or something like that? </p>
  
  <p>Or is the <code>$</code> just overwritten and used in different ways by the <code>findOne</code>, and <code>string.replace</code> functions, respectively?</p>