How can I convert {$game.name.fullname} to $game[\'name\'][\'fullname\'] using regex.
thanks
preg_replace( '/{\$([^.{}]*)\.([^.{}]*)\.([^.{}]*)}/', '$$1[\'$2\'][\'$3\']', '{$game.name.fullname}');
Edit: Edited according to ridgerunner's comment. Now matches anything between dots and matches multiple strings.