String s = "。<br/>       2、以上下載內容資訊僅供連線測試,嚴禁任何商業用途,下載後請於24小時內刪";
s = s.replaceAll("\\s", "");

Pattern p = Pattern.compile("\\s",Pattern.DOTALL);
Matcher m = p.matcher(s);
while(m.find()){
s = s.replace(m.group(), "");
}

System.out.println(s);打印的结果位。<br/>       2、以上下載內容資訊僅供連線測試,嚴禁任何商業用途,下載後請於24小時內刪2次替换都好像没起作用