let str123 = "[code-001-02中国]-[code-002-02法国]+[code-003-02英国]" str123.replace(/\][-+]\[/g,"][") 在控制台运行一下看看
let str123 = "[code-001-02中国]-[code-002-02法国]+[code-003-02英国]" str123.replace(/\][-+]\[/g,"][")
是这样吗
(?<=\]).*?(?=\[)
替换跟正则有关系吗
87,910
社区成员
224,616
社区内容
加载中
试试用AI创作助手写篇文章吧