苏飞论坛
标题:
求大神帮忙写一条正则表达式 。
[打印本页]
作者:
kovipp
时间:
2016-7-23 14:24
标题:
求大神帮忙写一条正则表达式 。
"tid":"39db4c09725ee55417c10000",
"uin":156031801,
"nick":"baby丶静儿",
"checkflag":0,
"reply_num":0,
"ttype":2,
"termtype":4,
"tagid":"",
"t1_wc_nick":"",
"source_url":"",
"source":1,
"content":"
谁给我发个红包吧
",
"create_time":
1424318066
,
"source_name":"小米",
"lbs":{
"id":"",
"idname":"",
"name":"",
"pos_x":"",
"pos_y":""
},
"conlist":[
{
"uin":0,
"nick":"",
"url":"",
"ourl":"",
"con":"谁给我发个红包吧",
"type":2,
"who":-1
}
],
"rich_info":[
]
}
,
",
"checkflag":\d+,
"reply_num":\d+,
"ttype":\d+,
"termtype":\d+,
"tagid":"",
"t1_wc_nick":"",
"source_url":"",
"source":\d+,
"content":"(.*?)",
{
"tid":"39db4c0988ab795354f30800",
"uin":156031801,
"nick":"baby丶静儿",
"checkflag":0,
"reply_num":0,
"ttype":2,
"termtype":3,
"tagid":"",
"t1_wc_nick":"",
"source_url":"",
"source":1,
"content":"
有时候沉默真好,可以假装什么都不知道
",
"create_time":
1400482696
,
"source_name":"iPhone 5",
红色的部分是需要提取的 那位大神帮帮忙
作者:
hxiaohua
时间:
2016-8-3 14:16
"content":"谁给我发个红包吧",
"create_time":1424318066,
不是很难吧
String a="\"content\":\"(.*)\",";
String b="\"content\":\"(\d+)\",";
对了,\要换成两个
作者:
我是MT
时间:
2016-8-20 20:15
目前很多的东西都是json提取,很少用正则了。如果正则提取有困难,就该想想json
欢迎光临 苏飞论坛 (http://www.sufeinet.com/)
Powered by Discuz! X3.4