List keywords in the template

Hello,
I would like to implement a validation to ensure the keywords in the template are available in the JSON object so I was hoping to be able to list the current keywords in the template.

var templateText = doc.Range.Text;

Regex regex = new Regex(@"<<\[(.*?)\]>>");

var matches = regex.Matches(templateText);

There could be multiple matches within each match entry for the regex so this would need additional processing.

I was wondering if there is an easier way to retrieve those keywords from the template.

Best Regards,
Hana

@HanaLGC Unfortunately, there is no built-in feature to address that at the moment. WORDSNET-17454 was already logged to implement it. However, its development is postponed and there is no ETA.

This comment provides a basic idea on how to collect contents of simple expression tags. It can be further extended to take all possible tags into account.