【发布时间】:2013-05-01 06:18:39
【问题描述】:
我需要替换here上定义的unicode字符
到目前为止,我已经得到了这个,但它似乎删除了所有空格,包括标准空格键:
var str = "Hello this is a test of the site";
str= str.replace(/[ \u00A0\u1680\u180e\u2000-\u2009\u200a\u200b\u202f\u205f\u3000]/g,'')
结果 - Hellothisistestofthesite
我只想删除字符串中 'test' 和 'of' 之间的 U+2003 的 unicode 字符。
【问题讨论】:
标签: javascript jquery regex