I\'m trying to do a PHP regular expression but i can\'t find the right way ...
Imagine I have this string: \"hello, my {{name is Peter}} and {{I want to eat chocolat
The PCRE functions a greedy by default. That means, that the engine always tries to match as much characters as possible. The solution is simple: Just tell him to act non-greedy with the U modifier
U
/{{(.+)}}/U
http://php.net/reference.pcre.pattern.modifiers