$re = '/^\s*Topic\s*\:\s*Bat[^{]+(\{.*\})\s*$/m';
$str = 'Topic:Cat [0] at offset:216712{"ID":55689534,"NAME":6}
Topic:Cat [1] at offset:216719{"ID":55689524,"NAME":6}
Topic : Bat [0] at offset:216716 {"CODE":94762151097,"AGE":32,data:{data:{} } }
Topic:Cat [0] at offset:216713{"ID":55689524,"NAME":6}
Topic:Bat [1] at offset:216723{"CODE":947080272531,"AGE":43}
Topic:Cat [1] at offset:216738{"ID":55689525,"NAME":6}';
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