1
的一部分,我有这样的JSON部分的正则表达式:什么是找到JSON
{
"destination_addresses":[
"8000 AA Zwolle, Nederland"
],
"origin_addresses":[
"8100 AA Heino, Nederland"
],
"rows":[
{
"elements":[
{
"distance":{
"text":"14,6 km",
"value":14555
},
"duration":{
"text":"17 min.",
"value":1022
},
"status":"OK"
}
]
}
],
"status":"OK"
}
我想要的正则表达式来查找值14555和价值1022而不是通过搜索这个数字(因为总人数改变),但是通过节点搜索(距离值和持续时间值)
任何想法?
为什么不能将它转换为对象并获取值? – Garfield
可能的重复:http://stackoverflow.com/questions/20916699/regular-expression-to-extract-json-string-from-text – McNets
/[0-9] +(?= \ s * \})/ g – youssouf