📜  js替换整个单词而不是单词中的单词 - Javascript代码示例
📅  最后修改于: 2022-03-11 15:03:12.408000             🧑  作者: Mango
代码示例1
const sampleString = "xsmall small medium";
console.log(sampleString.replace(/\bsmall\b/g, "test"));