
let myString = "您好, 编程小白。路条编程(www.iCodeRoad.com)欢迎您!";let strRegex = /icoderoad/i;let result = strRegex.test(myString);console.log(result);// => truemyString = "您好, 编程小白。路条编程(www.iCRoad.com)欢迎您!";result = strRegex.test(myString);console.log(result);// => falsemyString = "您好, 编程小白。路条编程(www.iCode Road.com)欢迎您!";result = strRegex.test(myString);console.log(result);// => false
truefalsefalse
今天就讲到这里,如果有问题需要咨询,大家可以直接留言或扫下方二维码关注公众号。也可以添加 happyzjp 微信受邀加入学习社群,我们会尽力为你解答。



作者:路条编程(转载请获本公众号授权,并注明作者与出处)
文章转载自路条编程,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




