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

Popular posts from this blog

javascript - Iterate over array and calculate average values of array-parts -

iphone - Using nested NSDictionary with Picker -

objective c - Newbie question -multiple parameters -