试图<br />用一个替换两个。无法正常工作。已经尝试了几个小时。
<br />
我的代码: thishtml = thishtml.replace(/(?:<br \/\>\s*){2,}/g, '<br>')
thishtml = thishtml.replace(/(?:<br \/\>\s*){2,}/g, '<br>')
不工作 帮助将是巨大的。
谢谢你
尝试
thishtml = thishtml.replace(/(?:<br[^>]*>\s*){2,}/g, '<br>')
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
点击生成二维码
我来说两句