String replacement template engine