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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -