title: Using regular expressions (regex) to replace selected text in jQuery / JavaScript
body: <p>In the example below, the text is selected using jQuery.  How can we isolate the currency by getting rid of the other data? </p>
  
  <p>This attempt at using JavaScript's <code>replace</code> did not work:  </p>
  
  <pre><code>var symbol = $("div.price &gt; h5 &gt; div.num").text().replace(/[\d.]*/, "");
  </code></pre>
  
  <p>This is the example HTML; the jQuery selector is working:</p>
  
  <pre><code>&lt;div class="price"&gt;
    &lt;h5 class="biguns"&gt;
      &lt;div class="num"&gt;
        €12.28
      &lt;/div&gt;
      Lowest Price Per Night
    &lt;/h5&gt;
  &lt;/div&gt;
  </code></pre>