I want to match all the words in a string which have pattern like {{word}}
For Example:
This {{is}} a test {{String}}. Should match {{is}} and {{String}}
I was using /{{(.*?)}}/g
which gives correct result for above case but fails when I have string something like
This {{is{{is}}}} a test String
Output Should be: {{is{{is}}}} but it is returning {{is{{is}}