At its core, grits applies regular expressions with named captures to input lines. These captures are then available as variables (a.k.a. anchors) which can then be used in a grits template string.