Java regex to strip out XML tags, but not tag contents

前端 未结 6 1575
有刺的猬
有刺的猬 2021-02-08 13:37

I have the following Java code:

str = str.replaceAll(\"<.*?>.*?|<.*?/>\", \"\");

This turns a String like so:



        
6条回答
提交回复
热议问题