private static bool TemplateExists(List<string> templatesFound, Regex r) { return templatesFound.Any(s => r.IsMatch(@"{{" + s + "}}")); }