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