let str="Visit Microsoft!"

console.log(str.replace(/Microsoft/, "Taeas"))
// 预期输出: Visit Taeas!

console.log(str.replace("Visit", "Look"))
// 预期输出: Look Microsoft!

eyan
0 声望0 粉丝