我想在ruby中找到一个正则表达式,在从输入字符串中删除字符串末尾的任何br标签后输出一个字符串,该br标签后面没有任何字符或后面有一个空格&nbsp
在实践中:
line1<br />
line2<br />
应成为输出:
line1<br />
line2
字符串
line1<br />
line2<br />
应成为输出:
line1<br />
line2
对于br标签,它应具有以下变体形式:
<br>
<br >
<br/>
<br /> ( my editor uses this one with an space between br and the closing > )