- 博客(1)
- 收藏
- 关注
原创 通过正则表达式取出字符串中匹配的字符
String s = new String("2_8_7.4_3_9_1"); // 字符串 Pattern p=Pattern.compile("[_.]"); //正则 (匹配 _ 和 . 的字符) Matcher m=p.matcher(s); while(m.find()){
2015-04-24 17:29:29 771
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
String s = new String("2_8_7.4_3_9_1"); // 字符串 Pattern p=Pattern.compile("[_.]"); //正则 (匹配 _ 和 . 的字符) Matcher m=p.matcher(s); while(m.find()){
2015-04-24 17:29:29 771
TA创建的收藏夹 TA关注的收藏夹
TA关注的人