need regex for {{%x}}

hi there

i need a regex to find & replace anything between {{% and }}

for now im using this:


#{{%(\w|\s)*}}#

but it not work with persian (utf8) characters and also when i use question mark in sentence, regex fail

how can i solve?

thanks in advanced

Use \p{L} for any utf-8 letter with u flag http://www.regular-expressions.info/unicode.html