开发者

Searching for a » character in a JavaScript RegExp

How can I sear开发者_开发技巧ch for a » character in a JavaScript regexp?

Code that's not working right now:

var extralinks = new RegExp('»','g');  
div.innerHTML = div.innerHTML.replace(extralinks,'This is special punctuation');  

Grazie!


var extraLinks = /\xBB/g;


look up the ASCII table and escape the character http://www.asciitable.com/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜