Hi there
I need a regex to match any thing between {{% and }} that work with utf8 characters too.
for now im using '#{{%(\w|\s|\?|\.|\+|\*|\^|\-)*}}#u' but there are some special chars that i cant handle them, for example check this list of special character (84 KB)
Please keep in mind that if you send over invalid UTF-8 sequence then the preg operation will fail as it first validate if it is correct. So if any of your strings contain invalid UTF-8 characters, that could be why it fails to return what your looking for.
Edit:
Also, if you have not tried it yet, when dealing with regex I can recommend RegexBuddy, a license is cheap, and it makes it easy to validate that the regex works as expected.