This JavaScript snippet will extract a price from a DOM element, remove all alphanumeric characters, such as currency or symbols or other words, and return it.
The second snippet will also round the value.
let price,
priceValue;
// Extract value
price = document.getElementById('price');
priceValue = parseInt(price.innerText.replace(/[^0-9.]/g, ''));
document.getElementById('result').innerHTML = priceValue;
// Extract value and round it
price = document.getElementById('price');
priceRounded = parseFloat(price.innerText.replace(/[^0-9.]/g, '')).toFixed(2);
document.getElementById('result-rounded').innerText = priceRounded;
See a fiddle here.

Technical SEO Specialist, JavaScript Programmer and Senior Full Stack Developer. On a quest to experiment with Canvas, WebGL, JavaScript, SEO and WordPress, among many other things. Founder of WPDublin and SpeedFactor, co-organizer of Dublin WordPress Meetup group.
If you like this article, go ahead and follow me on Twitter or buy me a coffee to support my work!