Attempts to extract a template