Example string:
$string = 'text text text text {capture this1, this2} text text text text';
I want to use preg_match, to get only these this1, and this2 in an array and nothing else.
I was trying something like so:
$array = array();
$reg = '/\{capture.*\}/'; //this needs changing
preg_match($reg, $string, $array);
var_dump($array);
This captures {capture this1, this2}. How do i exclude the '{' sign from regex? I was trying something like .!\{ but it gave me errors. Any suggestions?