正则表达式 - 空格 多个空格 String[] strTemp = str.split("\\s+"); - 匹配数字 "1".matches("\\d"); //true // String是小于10的正整数 "111".matches("\\d"); //false "111".matches("\\d+"); //true // String是正整数 "-