【JavaScript】常用正则

1、替换IP

str.replace(/http[s]?:\/\/.*\.[0-9]{1,4}(:[\w]+)?/g,'')

 

posted @ 2022-11-23 13:07  翠微  阅读(13)  评论(0编辑  收藏  举报