赞
踩
直接看代码:
var str = 'https://blog.csdn.net/qq_24147051/';var reg = /(http|https):\/\/([\w.]+\/?)\S*/ig if(str.match(reg)){ console.log("success");}