Here's my code,
$msg = "{yellow:red} ERROR: {blue:light_grey}";
$pattern = "/{(.*)}/";
$a = preg_match_all($pattern, $msg, $regex);
I'm expecting the following 2 matches:
{yellow:red}
{blue:light_grey}
But my result is:
Array
(
[0] => Array
(
[0] => {yellow:red} ERROR: {blue:light_grey}
)
[1] => Array
(
[0] => yellow:red} ERROR: {blue:light_grey
)
)
Any ideas what's wrong?