java正则匹配

来源:互联网 发布:linux echo的用法 编辑:程序博客网 时间:2024/05/16 18:58



String today="[A-Z]_[A-Z]_[A-Z]_";Pattern p = Pattern.compile(today); Matcher m = p.matcher(s);System.out.println(m.find() ? m.group(1) : "nothing");  



0 0