Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在整个字符串中有多个中断标签,如下所示:
<br></br>
我想用正则表达式替换它们:
<br/>
这些中断标签总是有一个开始和结束标签:
这应该这样做
"a string containing <br></br> <br> </br> <br>".replace(/<br>\W*<\/br>/g, "</br>")