REGEXP как добавить условие в регулярку/ How I can take id from line where Status:1 only
Беру этим первый id - :"([^"]+)" I take id :"([^"]+)"
А Мне необходимо брать id только в той строке, в которой status:1
I need in id in the first line where "status":1
{"success":true,"data":[{"id":"5","security_id":"1000000026","resolution_event_name":"test1","description":"test1","last_vo_date":"2020-01-14T02:00:00.000Z","activation_data":"2020-01-10T02:00:00.000Z","quorum":87,"status":2,"created_at":"2020-01-13T13:20:55.000Z","updated_at":"2020-01-31T01:59:59.000Z"},{"id":"7","security_id":"1000000026","resolution_event_name":"test2","description":"test2","last_vo_date":"2020-01-15T02:00:00.000Z","activation_data":"2020-01-13T02:00:00.000Z","quorum":1,"status":1,"created_at":"2020-01-14T14:19:33.000Z","updated_at":"2020-01-31T01:59:59.000Z"}
Ответы (1 шт):
I found only one way :"([^"]+)","security_id":"(.{1,10})","resolution_event_name":"(.{1,100})","description":"(.{1,100})","last_vo_date":"(.{24})","activation_data":"(.{24})","quorum":(.{0,100}),"status":1,"created_at":"(.{24})","updated_at":"(.{24})"}