$re = '/"([^"]+)":/';
$str = '{
"activity:status": "BOOKED",
"criteria:duration": 8,
"criteria:tripFrom": 1500242400,
"criteria:tripTo": 1500933600,
"intent:booker": 0.06258322237017303,
"intent:churnRisk": 0.3004193725304727,
"intent:churnRiskText": "LOW",
"intent:userClass": "CUSTOMER",
"issues:acs": 14,
"issues:total": 0,
"revenue": 2896,
"tracking:events": 162,
"tracking:firstVisit": 1475320136,
"tracking:lastVisit": 1498054362,
"tracking:sessions30": 19,
"tracking:timeSpent": 10603,
"value:potentialRevenue": {
"mean": 2880.5258186397987,
"stddev": 504.1184773012633,
"weight": 1,
"confidence": 1
},
"criteria:occupancy": {
"adults": 2,
"children": 2,
"infants": 0
}
}';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php