日期:2014-05-20 浏览次数:20991 次
"key":1,"title":"\u7ec5\u58eb\u7684\u54c1\u683c01","url":"http:\/\/www.letv.com\/ptv\/pplay\/77505\/1.html",
<script type="text/javascript">
var LISTCACHE =[
{
"key":1,"title":"\u7ec5\u58eb\u7684\u54c1\u683c01","url":"http:\/\/www.letv.com\/ptv\/pplay\/77505\/1.html",
"pic":"http:\/\/img1.c2.letv.com\/mms\/thumb\/2012\/05\/27\/4a9e475184bc2babf492961bbf2ba8bc\/4a9e475184bc2babf492961bbf2ba8bc_2.jpg"
},
{
"key":2,"title":"\u7ec5\u58eb\u7684\u54c1\u683c02","url":"http:\/\/www.letv.com\/ptv\/pplay\/77505\/2.html",
"pic":"http:\/\/img1.c2.letv.com\/mms\/thumb\/2012\/05\/28\/25faf71025166f8ebe1e4d6acbfe72e8\/25faf71025166f8ebe1e4d6acbfe72e8_2.jpg"
},
public static void main(String[] args) {
String str = "\"key\":1,\"title\":\"\\u7ec5\\u58eb\\u7684\\u54c1\\u683c01\",\"url\":\"http://www.letv.com/ptv/pplay/77505/1.html\",";
Matcher m = Pattern.compile("\"key\":(.+?),.+?\"url\":\"(.+?)\",.*?").matcher(str);
while(m.find()){
System.out.println(m.group(1));
System.out.println(m.group(2));
}
}