删除html标签,取其中的文本


public  String removeHtmlTags() {
    String str = "

welcome to test

"; String pattern = "\\<.*?\\>"; String target = str.replaceAll(pattern, ""); Return target; }

相关