js正则替换

“Paul Puala Pualine paul Paul”   把所有Paul替换成Ringo

var str = “Paul Puala Pualine paul Paul”; 
var txt = str.replace(/Paul/g,"Ringo");

posted @ 2018-11-02 13:29  改一个名字  阅读(1481)  评论(0编辑  收藏  举报