title: .replace() is not working like it should
body: <p>I am trying to toggle a hidden input element when the select element has a certain option. When I am alerted of variable q, q has no input but variable put does I am quite confused as to why .replace() removes the entire string.</p>
  
  <pre><code>function hiddeninput(choice, put) {
      var q = put.replace(/./g, "").replace(/#/g, "");
      alert(put + "," + q);//alerts .other,
      if (choice === q) {
          $(put).show();
      } else {
          $(put).hide();
      }
  }
  </code></pre>
  
  <p>Any help would be appreciated. JSfiddle has been quite buggy these past few days some of my previous working fiddles have stopped working, maybe that could be the reason.</p>