Java in String string filtering

Some online API data are presented with some of the symbols, in order to properly use must be filtered.

 //去除 "
String  img=img.replaceAll("\"","");

//去除 [
String  img=img.replaceAll("\\[","");
//去除 ]
String  img=img.replaceAll("\\]","");
//去除 \\
String  img=img.replaceAll("\\\\","");

 

Guess you like

Origin blog.csdn.net/qq_41334474/article/details/83685351