System.out.print(" aa bbcc ".replaceAll("(^\\s*)", ""));//去左空格
System.out.print(" aa bbcc ".replaceAll("(\\s*$)", ""));//去右空格
热门工具 换一换