Remove HTML tags from a String

后端 未结 30 3193
误落风尘
误落风尘 2020-11-21 07:35

Is there a good way to remove HTML from a Java string? A simple regex like

replaceAll("\\\\<.*?>", &quo         


        
30条回答
  •  -上瘾入骨i
    2020-11-21 07:58

    If you're writing for Android you can do this...

    android.text.Html.fromHtml(instruction).toString()
    

提交回复
热议问题