$re = '/([^!]+##)({[^!]+})/m';
$str = '\'AAAAA@5##{"pp-0":[{"pp-1": 1000, "pp-3": 1003},{"pp-4": 1004, "pp-7": 1007},{"pp-8": 1008, "pp-11": 1011},{"pp-12": 1012,"pp-17": 1015}],"pp-17": 1015,"pp-17": 1015}!!AAAAA@6##{"pp-0":[{"pp-1": 1000, "pp-3": 1003},{"pp-4": 1004, "pp-7": 1007},{"pp-8": 1008, "pp-11": 1011},{"pp-12": 1012,"pp-17": 1015}],"pp-17": 1015,"pp-17": 1015}!!AAAAA@7##{"pp-0":[{"pp-1": 1000, "pp-3": 1003},{"pp-4": 1004, "pp-7": 1007},{"pp-8": 1008, "pp-11": 1011},{"pp-12": 1012,"pp-17": 1015}],"pp-17": 1015,"pp-17": 1015}';
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