java使用Matcher类,取内容
后台通过查询得到一跳数据,格式如下 [234],想的到数字,马上想到用String类处理
String base = "[234]";
base = base.replace("[", "").replace("]", "");
回头看,正则用的很少,就试着用正则来处理
String base = "[234]";
String regex = "\\[(\\d*)\\]";
Patte
原创
2013-05-20 17:37:32 ·
1207 阅读 ·
0 评论