轉型產品

          走進需求
          posts - 0, comments - 0, trackbacks - 0, articles - 1
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          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;
              }

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


          網站導航:
           
          主站蜘蛛池模板: 抚远县| 新疆| 荣昌县| 长阳| 莱西市| 托克托县| 盈江县| 星子县| 冕宁县| 鞍山市| 桦川县| 同江市| 许昌县| 同心县| 化隆| 湟中县| 西宁市| 仁怀市| 黔西| 通道| 轮台县| 武定县| 德安县| 高碑店市| 五家渠市| 遂宁市| 三明市| 静宁县| 洱源县| 肇源县| 司法| 青田县| 关岭| 菏泽市| 高雄市| 临澧县| 香港| 京山县| 恭城| 平罗县| 新平|