# Part VI — Forward expand() and Reverse template_extract_text() / template_extract() tpl = "site=${site};env=${env};end"; line = expand(tpl, {site: "lmscript.io", env: "prod"}); println("Rendered : " + line); rev = template_extract_text(tpl, line); require(rev.matched, "expected reverse template text match"); println("Extracted : " + json_stringify(rev.value)); rows = template_extract([{kind: "host", name: "$name"}], [ {kind: "host", name: "lmaws"}, {kind: "skip", name: "none"}, {kind: "host", name: "lmcad"} ]); println("Projected : " + json_stringify(rows.value));