Answer the question
In order to leave comments, you need to log in
Again I can not cope with the regular expression, or how to capture the entire json array correctly?
I want to put the answer from api vk in json format into the list without connecting libraries,
etc.
(?<=\{"uid":)([0-9]{1,}),"f.*?(?=})
{"uid":32711210,"first_name":"Юрий","last_name":"Коцюбинский","sex":2,"bdate":"15.5.1976","relation":4,"relatives":[{"uid":195139503,"type":"sibling"},{"uid":191446274,"type":"sibling"},{"uid":95498830,"type":"sibling"},{"uid":182441705,"type":"sibling"},{"uid":232168089,"type":"sibling"},{"uid":11080578,"type":"sibling"}]}
32711210,"first_name":"Юрий","last_name":"Коцюбинский","sex":2,"bdate":"15.5.1976","relation":4,"relatives":[{"uid":195139503,"type":"sibling"
Answer the question
In order to leave comments, you need to log in
I don't understand why regular?
php.net/manual/ru/function.json-decode.php
php.net/manual/ru/function.json-encode.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question