字符串替换

<script>
var str=('Paul,Paula,paul,Ppaul,Paul');
var new_str=str.replace(/(Paul)/g,"ringo");//Paul替换为ringo
document.write(new_str);
</script>

原文地址:https://www.cnblogs.com/zl1234/p/9867577.html