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