Remove html special character with regex and jQuery -
what necessary regular expression match € special character following html string?
€20.000.000,00
ultimately, want strip € symbol number. currently, code looks this:
num = $("#number").html(); num.replace('€',''); $("number").html(num)
but of course need replace '€'
correct regex.
it appears time manipulating text jquery, html abbreviation €
has been replaced actual unicode value -- true single character €
. regular expression refers unicode character value should trick you.
var x = $('#number').html(); x = x.replace(/\u20ac/, ''); $('#number').html(x);
Comments
Post a Comment