1
2
3
4
5
6
7
8
9
10
11
12
13
14
public static String addComma(String str) {
    return str.replaceAll("\\B(?=(\\d{3})+(?!\\d))"",");
}
 
 
public static String removeTag(String html) {
    String tmp = html.replaceAll("<(/)?([a-zA-Z]*)(\\s[a-zA-Z]*=[^>]*)?(\\s)*(/)?>""");
    tmp = tmp.replaceAll("[@$^]""");
    tmp = tmp.replaceAll("&amp;""");
    tmp = tmp.replaceAll("&quot;""");
    tmp = tmp.replaceAll("&lt;""");
    tmp = tmp.replaceAll("&gt;""");
    return tmp;
}
cs

+ Recent posts