public String removeHtmlTags() { String str = "<p><b> welcome to test</b></p>"; String pattern = "\\<.*?\\>"; String target = str.replaceAll(pattern, ""); Return target; }