Filter for whole word when replacing text in a template.json
11:02 10 Aug 2026

I am creating a template.json file and I want to replace the word "Stat" within my template with whatever the user puts in.

{
    "$schema": "http://json.schemastore.org/template",
    // ...,
    "symbols": {
      "Conformance":{
        "type": "parameter",
        "description": "The conformance of the stat building block.",
        "datatype": "text",
        "replaces": "Stat",
        "defaultValue": "Stat"
      },
      "conformance":{
        "type": "generated",
        "generator": "casing",
        "parameters": {
          "source": "Conformance",
          "toLower": true
        },
        "replaces": "stat"
      }
    }
  }

The problem is that this also replaces words like static, which my template file uses twice.

Is there any way to filter for whole word? Or should I simply have my template file use some text like MY_STAT?

c# templates