📜  正则表达式和 - Javascript 代码示例

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

代码示例1
/[]/


let bigStr = "big";
let bagStr = "bag";
let bugStr = "bug";
let bogStr = "bog";
let bgRegex = /b[aiu]g/;
bigStr.match(bgRegex);
bagStr.match(bgRegex);
bugStr.match(bgRegex);
bogStr.match(bgRegex);