I do want to match all subbstrings which are between {{ and }}
When this substring does not contain . , the regex works fine :
"When he come, {{person}} will give his son {{something}}".match(/{{(\w*)}}/g) ;
Result :
["{{person}}", "{{something}}"]
Now , if this substring contains .(dot) , the regex does not work as it is expected :
"When he come, {{person.firstname}} will give his son {{something}}".match(/{{(\w*)}}/g) ;
Result :
["{{something}}"]