How to replace the tag <br \/">
4 answers
use
top=top.replaceall("<br\\/>"," "); instead
top=top.replaceall("<br\/>"," "); EDIT: Maybe String.relpaceall is not working. therefore, the best way is to use the Matcher regex as:
Pattern p = Pattern.compile("<br\\/>"); String tempstr = "I love <br/> <br/> <br/> <br/>."; Matcher matcher = p.matcher(tempstr ); String tmp = matcher.replaceAll("Android"); System.out.println(tmp); OUTPUT:
"I love Android. Android Android Android."
+8