22
rated 0 times
[
29]
[
7]
/ answers: 1 / hits: 19990
/ 9 Years ago, fri, april 24, 2015, 12:00:00
I'm looking to replace a bad character that a content editable div uses when a space is added at the end of the input.
Here is what I've tried
var text = $(this).text();
text.replace(/u00A0/, );
But when I check the value of the last character like this
text.charCodeAt(text.length-1)
The value is still 160 instead of 32
More From » regex