📌  相关文章
📜  将空格转换为连字符 javascript regex - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:24.992000             🧑  作者: Mango

代码示例2
let str = "Sonic Free Games";
str = str.replace(/\s+/g, '-').toLowerCase();
console.log(str); // "sonic-free-games"