阅读背景:

正则表达式,JEditorPane,自闭标签。

来源:互联网 

I'm am using JEditorPane to render basic HTML. But it renders self-closing tags incorrectly, specifically br tags, e.g. <br /> is bad but <br> is good. I would like to use String.replaceAll(regex, "<br>") to fix the HTML, where regex is a regular expression matching any self-closing br tag with case-insensitivity and zero to infinity number of spaces between the "r" and the "/" (e.g., <br/>, <BR/>, <br />, <Br     />, etc.).I'm am using JEditorPane to render basic HTML.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: