Reputation: 492
I have this JavaScript code:
var test123 = $('product-price-' + productId).innerHTML; // thats 26,00 €
var finalPrice = test123.replace(/[^\d.,]/, "");
Testing my regex here: http://www.regular-expressions.info/javascriptexample.html correctly returns me 26,00, exactly what I want. Why is it not working in my code? In my code it replaces nothing at all.
Thanks!
Upvotes: 0
Views: 1230