title: Javascript Regex object and the dollar symbol
body: <p>In the code below. I expected true but i am getting false instead. What am I missing?</p>
  
  <pre><code>var text = "Sentence $confirmationlink$ fooo";     
  alert(placeHolderExists(text,'confirmationlink'); // alerts false
  function placeHolderExists(text,placeholdername) {  
    var pattern = new    RegExp('\$'+placeholdername+'\$');    
    return pattern.test(text);
  }
  </code></pre>