首页 新闻 搜索 专区 学院

求一个正则表达式Python(或如何用Python解析多层嵌套且不规则的Json)

0
悬赏园豆:50 [待解决问题]

文本如下:
"fillPlanDate":1652245200000,
"co":""新城邻里中心":"6.5","斜塘邻里中心":"8","玲珑邻里中心":"6.5","里河农贸市场":"6.5","师惠邻里中心":"6.50","湖东邻里中心":"6.5","三元二村农贸市场":"8","马医科农贸市场":"4.5","狮山农贸市场":"6","枫津农贸市场":"6","双塔农贸市场":"10","新庄农贸市场":"6.5","娄门农贸市场":"6","金狮河沿农贸市场":"7","新民桥农贸市场":"6.5","朝阳农贸市场":"7","翰林邻里中心":"6.50","新龙农贸市场":"7.0","胥江农贸市场":"6","沁苑邻里中心":"7","南门水产批发市场":"5","新浒农贸市场":"6","蠡口农贸市场":"7.5","彩香一村农贸市场":"8.0","东环路农贸市场":"6","兆佳巷邻里中心":"6.5","陆慕农贸市场":"6"",
"productName":"蒜苗",
"spec":"一等"
},
{
"fillPlanDate":1652245200000,
"co":""蠡口农贸市场":"4","彩香一村农贸市场":"4.0","兆佳巷邻里中心":"3.5","东环路农贸市场":"3","陆慕农贸市场":"3","水坊路邻里中心":"3","新城邻里中心":"3.5","斜塘邻里中心":"4.5","玲珑邻里中心":"3.5","里河农贸市场":"4.0","师惠邻里中心":"3.50","湖东邻里中心":"3.5","三元二村农贸市场":"4","马医科农贸市场":"3.5","狮山农贸市场":"4","枫津农贸市场":"4","双塔农贸市场":"4","新庄农贸市场":"4.5","娄门农贸市场":"3","金狮河沿农贸市场":"3","新民桥农贸市场":"3.5","朝阳农贸市场":"3.5","翰林邻里中心":"3.50","新龙农贸市场":"4.5","胥江农贸市场":"3","沁苑邻里中心":"3.5","南门水产批发市场":"1.5","新浒农贸市场":"2.8"",
"productName":"南瓜",
"spec":"一等"

每种蔬菜对应了不同的市场, 各种蔬菜所在市场也各不相同。
如何能用正则表达式将其取出, 并且一种蔬菜对应各自不同的市场。

小白沙的主页 小白沙 | 初学一级 | 园豆:105
提问于:2022-05-13 13:39
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册