如何和任何数字相匹配
还有我想匹配 字符H 或 V ,写成H|V 为什么不对

解决方案 »

  1.   

     我想得到 有V 或H 后是任意字符 之后有一个.c ( 数字是0到9 ,数字是0到9)
    这样写为什么不对呢?
        String pattern= ".*V|H(.*).c([0-9],[0-9])";
      
       RE re = new RE(pattern);
       
        retu = re.match("T(V(fgdg).d(gdgdgdg8,5))");
    为什么 boolean 给返回的True 呢
      

  2.   

    String pattern=".*[VH]+.*\\.c\\(\\d,\\d\\)";
    Java中