String str=1+2; String[] temp = str.split(\\D); 解答:\\d正则表达式是非数字的意思以非数字分割字符串str,将所得结果存档到temp字符串数组中。 \\d*表示有多位数字。 比如在验证的form中就常用到 if (!this.integral.matches("\\d*")) { errors.add("integral", new ActionMessage("user.integral.error")); }