java 正则表达式 Pattern.compile(String regex, int flags) 使用
使用Pattern.compile编译表达式时,如何选择多种模式呢
@Test
public void testPattern(){
Pattern p = Pattern.compile("a.*b", Pattern.CASE_INSENSITIVE + Pattern.DOTALL);
Matcher m = p.matcher("AA\nb");
assert...
原创
2011-11-10 14:08:36 ·
2051 阅读 ·
0 评论