📌  相关文章
📜  js 字符串到正则表达式 - Javascript 代码示例

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

代码示例3
// Tests website Regular Expression against document.location (current page url)
if (/^https\:\/\/example\.com\/$/.exec(document.location)){
    console.log("Look mam, I can regex!");
}