可能重複:
How to remove HTML tag in Java
RegEx match open tags except XHTML self-contained tagsJAVA正則表達式來刪除HTML標記和內容
我想刪除特定HTML標籤的內容。
例如,如果HTML:
<span style='font-family:Verdana;mso-bidi-font-family:
"Times New Roman";display:none;mso-hide:all'>contents</span>
如果標籤包含 「mso- *」,它必須刪除整個標籤(開,關,內容)。
個人而言,我會使用HTML解析器。 –
[RegEx match open tags not except XHTML self-contained tags](http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags)可能的重複和[how -to-remove-html-tag-in-java](http://stackoverflow.com/questions/1699313/how-to-remove-html-tag-in-java) – CoolBeans
這些類型的問題沒有被問到很多次在這裏? –