*
matches greedy (as much as possible). Use non-greey version: *?
if (preg_match_all('/"([^:]*?)"/', $s, $matches)) {
echo join("\n", $matches[1]);
}
output:
names
George
Eric
Alice
UPDATE
json_decode
is more appropriate for this kind of work. Try following:
foreach (json_decode($s, true) as $key => $value) {
echo $key . "\n";
echo join("\n", $value);
}