admin管理员组文章数量:1391977
How to remove following symbol/special character in string using jquery
¶
I have problem during paring two strings . Above mentioned symbol is append when I pute difference. I also test it in my local application please check link below.
/software/diff_match_patch/svn/trunk/demos/demo_diff.html
How to remove following symbol/special character in string using jquery
¶
I have problem during paring two strings . Above mentioned symbol is append when I pute difference. I also test it in my local application please check link below.
http://neil.fraser.name/software/diff_match_patch/svn/trunk/demos/demo_diff.html
Share Improve this question edited Feb 1, 2012 at 13:50 ziesemer 28.7k9 gold badges88 silver badges95 bronze badges asked Feb 1, 2012 at 13:42 AliAli 3,63511 gold badges47 silver badges64 bronze badges3 Answers
Reset to default 6var s = "This is a string that contains ¶, a special character.";
s = s.replace(/¶/g, "");
Yields:
"This is a string that contains , a special character."
This will remove all occurrences of the character. No jQuery necessary - just vanilla browser-provided JavaScript.
Some additional details are available at https://developer.mozilla/en/JavaScript/Reference/Global_Objects/String/replace.
jQuery isn't needed for this, you can achieve it by using native javascripts replace
function:
var myString = "ABC¶DEFG"
alert(myString.replace("¶", ""))
Example fiddle
javascript replace function should work. If it isn't finding the character then try using the unicode or ansi equivalent.
http://www.alanwood/demos/ansi.html
本文标签: javascriptHow to remove following symbolspecial character in string using jquery 182Stack Overflow
版权声明:本文标题:javascript - How to remove following symbolspecial character in string using jquery ¶ - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744666793a2618581.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论