据说这样的正则可以把浏览器卡爆

let reg3 = /^(https?|ftp):\/\/([a-zA-Z0-9.-_]+(:[a-zA-Z0-9.&%$-@]+)*)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
    let str3 = "http://apiaz.im30app.com/datax/elva/last_orderId.php";

    console.log(reg3.test(str3));

 

 

 

 

posted @ 2021-04-23 15:58  古墩古墩  Views(63)  Comments(0Edit  收藏  举报