I know this has been asked before, but I just couldn't get mine to work. Using this example, Im trying to get the template variable but not if its used in some kind of tag.
{{ callMe() }}
<img src="{{ callMe() }}" />
Should match the first one, {{ callMe() }}
but not the second. Ive been tinkering with negative lookahead, but not sure if i understand it. Here's my regex. Can anyone please have a look. Thanks.
(?!<.+\/?>)(({{.*([\w\.]+)\(.*\).*}}))