javascript以及java中的正则表达式证验

javascript以及java中的正则表达式验证regex.jsp:String buffer to_be_testedPattern p nullMatche

javascript以及java中的正则表达式验证

regex.jsp:

String buffer = "to_be_tested"Pattern p = null;Matcher m = null;p = Pattern.compile("[atcgnATCGN]+");m = p.matcher(buffer);boolean b = m.matches();

?