Pattern p = Pattern.compile("*[ +-\\*/=]*");Matcher m = p.matcher(s); // s是要检验的文本System.out.println(m.matches());
我