Pattern pattern = Pattern.compile("[\\s\\p{Zs}]");
Matcher re = pattern.matcher(imageURLString);
imageURLString=re.replaceAll("");//去掉空白
Pattern pattern = Pattern.compile("[\\s\\p{Zs}]");
Matcher re = pattern.matcher(imageURLString);
imageURLString=re.replaceAll("");//去掉空白
转载于:https://www.cnblogs.com/altya/archive/2011/04/06/2006901.html