diff --git a/src/Faker/Generator.php b/src/Faker/Generator.php index 3d7ce6a6c9..c0a907f7a7 100644 --- a/src/Faker/Generator.php +++ b/src/Faker/Generator.php @@ -736,7 +736,7 @@ public function parse($string) return $this->format($matches[1]); }; - return preg_replace_callback('/\{\{\s?(\w+)\s?\}\}/u', $callback, $string); + return preg_replace_callback('/{{\s?(\w+|[\w\\\]+->\w+?)\s?}}/u', $callback, $string); } /**