posts - 0, comments - 0, trackbacks - 0, articles - 1
            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          Java Regex Compile

          Posted on 2014-09-12 16:56 mrtom 閱讀(79) 評論(0)  編輯  收藏
          public static ArrayList<String> regexPattenArray(String regex,String content)
              {
                  String cont = content;
                  ArrayList<String> arrs = new ArrayList<String>();
                  
                  if(regex != null && cont != null)
                  {            
                      Matcher mat = Pattern.compile(regex).matcher(content);
                      
                      while(mat.find())
                      {
                          cont = mat.group();
                          arrs.add(cont);
                      }
                  }
                  
                  return arrs;
              }

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 浦东新区| 朝阳县| 中西区| 淮北市| 象山县| 邵武市| 吉林省| 靖西县| 恭城| 无为县| 红河县| 郑州市| 阿克陶县| 确山县| 云安县| 昌宁县| 綦江县| 漳州市| 丰镇市| 吴旗县| 从化市| 九江县| 塘沽区| 会泽县| 大余县| 甘孜| 遂宁市| 靖江市| 砚山县| 来安县| 兴仁县| 长子县| 绵阳市| 宜川县| 清原| 佛学| 凌海市| 江阴市| 丹东市| 齐齐哈尔市| 新宾|