【JavaScript】常用正则

1、替换IP

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

 

posted @ 2022-11-23 13:08  谷粒-笔记  阅读(25)  评论(0)    收藏  举报